100 atcoder#ABC211B. [ABC211B] Cycle Hit
[ABC211B] Cycle Hit
Score : points
Problem Statement
You are given four strings , , , and .
Determine whether this sequence of strings has one of each of the following: H, 2B, 3B, and HR.
Here, it is guaranteed that every is H, 2B, 3B, or HR.
Constraints
- Each is
H,2B,3B, orHR.
Input
Input is given from Standard Input in the following format:
Output
If the given sequence of strings has one of each of H, 2B, 3B, and HR, print Yes.
Otherwise, print No.
3B
HR
2B
H
Yes
We have one of each of H, 2B, 3B, and HR.
2B
3B
HR
3B
No
We have no H.