#abc370a. A - Raise Both Hands
A - Raise Both Hands
Score : points
问题陈述
高桥决定做章鱼烧并提供给斯努克。高桥指示斯努克,如果他想吃章鱼烧,就只举起他的左手;否则,就只举起他的右手。
你得到了斯努克举起哪只手的信息,以两个整数 和 表示。如果他举起左手,那么 ;如果他举起右手,那么 。他可能不按指示行事,可能会同时举起双手,或者根本不举起任何手。
如果斯努克只举起一只手,如果他想吃章鱼烧,就打印 Yes
,如果他不想吃,就打印 No
。如果他同时举起双手或没有举起任何手,就打印 Invalid
。
假设如果斯努克只举起一只手,他总是按照指示行事。
以上为大语言模型 kimi 翻译,仅供参考。
Problem Statement
Takahashi decided to make takoyaki (octopus balls) and serve it to Snuke. Takahashi instructed Snuke to raise only his left hand if he wants to eat takoyaki, and only his right hand otherwise.
You are given the information about which hand Snuke is raising as two integers and . He is raising his left hand if and only if , and raising his right hand if and only if . He might not follow the instructions and could raise both hands or not raise any hand at all.
If Snuke is raising only one hand, print Yes
if he wants to eat takoyaki, and No
if he does not. If he is raising both hands or not raising any hand, print Invalid
.
Assume that if Snuke is raising only one hand, he is always following the instructions.
Constraints
- Each of and is or .
Input
The input is given from Standard Input in the following format:
Output
Print Yes
, No
, or Invalid
according to the instructions in the problem statement.
Sample Input 1
1 0
Sample Output 1
Yes
Snuke wants to eat takoyaki, so he is raising only his left hand.
Sample Input 2
1 1
Sample Output 2
Invalid
Snuke is raising both hands.