Sharing Cookies

AtCoder
IDabc067_a
Time2000ms
Memory256MB
Difficulty
Snuke is giving cookies to his three goats. He has two cookie tins. One contains $A$ cookies, and the other contains $B$ cookies. He can thus give $A$ cookies, $B$ cookies or $A+B$ cookies to his goats (he cannot open the tins). Your task is to determine whether Snuke can give cookies to his three goats so that each of them can have the same number of cookies. ## Constraints * $1 \leq A,B \leq 100$ * Both $A$ and $B$ are integers. ## Input Input is given from Standard Input in the following format: $A$ $B$ [samples]
Samples
Input #1
4 5
Output #1
Possible

If Snuke gives nine cookies, each of the three goats can have three cookies.
Input #2
1 1
Output #2
Impossible

Since there are only two cookies, the three goats cannot have the same number of cookies no matter what Snuke gives to them.
API Response (JSON)
{
  "problem": {
    "name": "Sharing Cookies",
    "description": {
      "content": "Snuke is giving cookies to his three goats. He has two cookie tins. One contains $A$ cookies, and the other contains $B$ cookies. He can thus give $A$ cookies, $B$ cookies or $A+B$ cookies to his goat",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc067_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Snuke is giving cookies to his three goats.\nHe has two cookie tins. One contains $A$ cookies, and the other contains $B$ cookies. He can thus give $A$ cookies, $B$ cookies or $A+B$ cookies to his goat...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments