103700: [Atcoder]ABC370 A - Raise Both Hands

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:10 Solved:0

Description

Score : $100$ points

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 $L$ and $R$. He is raising his left hand if and only if $L = 1$, and raising his right hand if and only if $R = 1$. 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 $L$ and $R$ is $0$ or $1$.

Input

The input is given from Standard Input in the following format:

$L$ $R$

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.

Output

得分:100分

问题陈述

高桥决定制作章鱼烧给斯努克吃。高桥指示斯努克,如果他想吃章鱼烧,就只举起他的左手,否则只举起他的右手。

你将得到关于斯努克举起哪只手的信息,用两个整数$L$和$R$表示。 当且仅当$L=1$时,他举起左手;当且仅当$R=1$时,他举起右手。他可能不遵循指示,可能会举起双手或者不举起任何一只手。

如果斯努克只举起一只手,如果他想吃章鱼烧,打印Yes,如果不想吃,打印No。如果他举起双手或者没有举起任何一只手,打印Invalid

假设如果斯努克只举起一只手,他总是在遵循指示。

约束条件

  • $L$和$R$每个都是0或1。

输入

输入从标准输入以下格式给出:

$L$ $R$

输出

根据问题陈述中的指示打印YesNoInvalid


样本输入1

1 0

样本输出1

Yes

斯努克想吃章鱼烧,所以他只举起了他的左手。


样本输入2

1 1

样本输出2

Invalid

斯努克举起了双手。

加入题单

上一题 下一题 算法标签: