Prime Sum Game

AtCoder
IDabc239_d
Time2000ms
Memory256MB
Difficulty
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$ [samples]
Samples
Input #1
2 3 3 4
Output #1
Aoki

For example, if Takahashi chooses $2$, Aoki can choose $3$ to make the sum $5$, which is a prime.
Input #2
1 100 50 60
Output #2
Takahashi

If they play optimally, Takahashi always wins.
Input #3
3 14 1 5
Output #3
Aoki
API Response (JSON)
{
  "problem": {
    "name": "Prime Sum Game",
    "description": {
      "content": "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).",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc239_d"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Takahashi and Aoki are playing a game.\n\n*   First, Takahashi chooses an integer between $A$ and $B$ (inclusive) and tells it to Aoki.\n*   Next, Aoki chooses an integer between $C$ and $D$ (inclusive)....",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments