#abc239d. D - Prime Sum Game

D - Prime Sum Game

Score : 400400 points

问题描述

Takahashi 和 Aoki 正在玩一个游戏。

  • 首先,Takahashi 在 AABB(包含端点)之间选择一个整数并告诉 Aoki。
  • 接着,Aoki 在 CCDD(包含端点)之间选择一个整数。
  • 如果这两个整数之和是质数,则 Aoki 获胜;否则,Takahashi 获胜。

当两位玩家都采取最优策略时,哪位玩家会获胜?

以上为通义千问 qwen-max 翻译,仅供参考。

Problem Statement

Takahashi and Aoki are playing a game.

  • First, Takahashi chooses an integer between AA and BB (inclusive) and tells it to Aoki.
  • Next, Aoki chooses an integer between CC and DD (inclusive).
  • If the sum of these two integers is a prime, then Aoki wins; otherwise, Takahashi wins.

When the two players play optimally, which player will win?

Constraints

  • 1AB1001 \leq A \leq B \leq 100
  • 1CD1001 \leq C \leq D \leq 100
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

AA BB CC DD

Output

If Takahashi wins when the two players play optimally, print Takahashi; if Aoki wins, print Aoki.

Sample Input 1

2 3 3 4

Sample Output 1

Aoki

For example, if Takahashi chooses 22, Aoki can choose 33 to make the sum 55, which is a prime.

Sample Input 2

1 100 50 60

Sample Output 2

Takahashi

If they play optimally, Takahashi always wins.

Sample Input 3

3 14 1 5

Sample Output 3

Aoki

update @ 2024/3/10 10:19:02

}