#abc100a. A - Happy Birthday!
A - Happy Birthday!
Score: points
问题陈述
E869120和square1001的第个生日即将到来。
来自AtCoder王国的高桥为他们提供了一个切成16等份扇形的圆形蛋糕。
E869120和square1001正准备分别吃掉其中的块和块蛋糕时,
他们在蛋糕上发现了一张便签,上面写着“同一个人不应拿取相邻的两块蛋糕”。
他们两人能否按照便签上的指示,各自拿取想要数量的蛋糕片呢?
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
E869120's and square1001's -th birthday is coming soon.
Takahashi from AtCoder Kingdom gave them a round cake cut into equal fan-shaped pieces.
E869120 and square1001 were just about to eat and 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
- and are integers between and (inclusive).
- is at most .
Input
Input is given from Standard Input in the following format:
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.
update @ 2024/3/10 17:18:16