実行時間制限: 2 sec / メモリ制限: 1024 MB
配点 : 400 点
問題文
高橋君と青木君が次のようなゲームをします。
- まず、高橋君が A 以上 B 以下の好きな整数を選び、青木君に伝える
- 次に、青木君が C 以上 D 以下の好きな整数を選ぶ
- 二人の選んだ整数の和が素数なら青木君の勝ち、そうでなければ高橋君の勝ち
二人が最適な戦略を取るとき、どちらが勝ちますか?
制約
- 1 \leq A \leq B \leq 100
- 1 \leq C \leq D \leq 100
- 入力に含まれる値は全て整数である
入力
入力は以下の形式で標準入力から与えられる。
A B C D
出力
二人が最適な戦略をとったとき、高橋君が勝つなら Takahashi
、青木君が勝つなら Aoki
を出力せよ。
入力例 1
2 3 3 4
出力例 1
Aoki
例えば高橋君が 2 を選んだときは、青木君は 3 を選ぶことで、和を素数である 5 にすることができます。
入力例 2
1 100 50 60
出力例 2
Takahashi
最適な戦略を取ると高橋君が必ず勝ちます。
入力例 3
3 14 1 5
出力例 3
Aoki
Score : 400 points
Problem Statement
Takahashi and Aoki are playing a game.
- First, Takahashi chooses an integer between A and B (inclusive) and tells it to Aoki.
- Next, Aoki chooses an integer between C and D (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
- 1 \leq A \leq B \leq 100
- 1 \leq C \leq D \leq 100
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
A B C D
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 2, Aoki can choose 3 to make the sum 5, 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