Raise Both Hands

AtCoder
IDabc370_a
Time2000ms
Memory256MB
Difficulty
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$ [samples]
Samples
Input #1
1 0
Output #1
Yes

Snuke wants to eat takoyaki, so he is raising only his left hand.
Input #2
1 1
Output #2
Invalid

Snuke is raising both hands.
API Response (JSON)
{
  "problem": {
    "name": "Raise Both Hands",
    "description": {
      "content": "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",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc370_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "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.\nYou are...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments