-
-
- Top - -
- Tasks - + + - -
- Clarifications - + + + - +
- Standings - - - -
- Virtual Standings - - - + +
- + + Top + - +
- + + Tasks + - -
- Editorial - - - - - +
- + + Clarifications + -
- -
- + + Editorial + - + +
- + A, B は 1 以上 + 16 以下の整数 + +
- A+B は 16 以下である. +
- + A and B are integers between + 1 and 16 (inclusive). + +
- A+B is at most 16. +
Contest started
+AtCoder Beginner Contest 100 has begun.
+Contest is over
+AtCoder Beginner Contest 100 has ended.
+-
+
/
-
- -
- Time Limit: 2 sec / Memory Limit: 976 MiB - - -
+配点: 100 点
- +問題文
+
+ もうすぐ E869120 君と square1001 君の
+ 16 才の誕生日が来る.
+ そこで, AtCoder 王国の高橋君は, 円形のケーキ
+ 1 個に放射状に切れ目を入れ
+ 16 等分したものを, 彼らにプレゼントした.
+
+ E869120 君はそのうち A 切れ、square1001 君は
+ B 切れを食べようとした.
+ しかし, ケーキと一緒についていた紙を見ると,
+ 「同じ人が隣り合う
+ 2
+ 切れのケーキを両方取ってはならない」と書かれていた.
+
+ さて、彼らは紙に書かれたことを守って、2 + 人とも食べたい数のケーキを取ることができるだろうか? +
+制約
+-
+
+
入力
+入力は以下の形式で標準入力から与えられる.
+A B ++
出力
+
+ 紙に書かれたことを守って, E869120 君と square1001
+ 君両方が, 食べたい数のケーキを取ることができるならば
+ Yay!, そうでなければ
+ :( と出力しなさい.
+
- - - - +
- - - -
-
入力例 1
++5 4 ++
出力例 1
++Yay! +- +
+ 下の図のようにケーキを取れば、2
+ 人とも目標を達成することができる.
+
+
+ +
入力例 2
++8 8 ++
出力例 2
++Yay! ++ +
+ 下の図のようにケーキを取れば、2
+ 人とも目標を達成することができる.
+
+
+ +
入力例 3
++11 4 ++
出力例 3
++:( ++ +
+ この場合, 残念ながら目標を達成する方法は + 1 つもない. +
+Score: 100 points
+ +Problem Statement
+
+ E869120's and square1001's 16-th birthday is
+ coming soon.
+ Takahashi from AtCoder Kingdom gave them a round cake
+ cut into 16 equal fan-shaped pieces.
+
+ E869120 and square1001 were just about to eat
+ A and B of those pieces,
+ respectively,
+ when they found a note attached to the cake saying that
+ "the same person should not take two adjacent pieces of
+ cake".
+
+ Can both of them obey the instruction in the note and + take desired numbers of pieces of cake? +
+Constraints
+-
+
+ +
Input
++ Input is given from Standard Input in the following + format: +
+A B ++
Output
+
+ If both E869120 and square1001 can obey the
+ instruction in the note and take desired numbers of
+ pieces of cake, print Yay!; otherwise,
+ print :(.
+
+ +
Sample Input 1
++5 4 ++
Sample Output 1
++Yay! ++ +
+ Both of them can take desired number of pieces as
+ follows:
+
+
+ +
Sample Input 2
++8 8 ++
Sample Output 2
++Yay! ++ +
+ Both of them can take desired number of pieces as
+ follows:
+
+
+ +
Sample Input 3
++11 4 ++
Sample Output 3
++:( ++ +
+ In this case, there is no way for them to take desired + number of pieces, unfortunately. +
++ + + + +
+


