/
Time Limit: 2 sec / Memory Limit: 1024 MiB
配点 : 100 点
問題文
英大文字からなる長さ 3 の文字列 S が与えられます。S が ACE、BDF、CEG、DFA、EGB、FAC、GBD のいずれかと等しいとき Yes を、そうでないとき No を出力してください。
制約
- S は英大文字からなる長さ 3 の文字列
入力
入力は以下の形式で標準入力から与えられる。
S
出力
S が ACE、BDF、CEG、DFA、EGB、FAC、GBD のいずれかと等しいとき Yes を、そうでないとき No を出力せよ。
入力例 1
ABC
出力例 1
No
S = ABC のとき、S は ACE、BDF、CEG、DFA、EGB、FAC、GBD のいずれとも等しくないので No を出力します。
入力例 2
FAC
出力例 2
Yes
入力例 3
XYX
出力例 3
No
Score : 100 points
Problem Statement
Given a length-3 string S consisting of uppercase English letters, print Yes if S equals one of ACE, BDF, CEG, DFA, EGB, FAC, and GBD; print No otherwise.
Constraints
- S is a length-3 string consisting of uppercase English letters.
Input
The input is given from Standard Input in the following format:
S
Output
Print Yes if S equals one of ACE, BDF, CEG, DFA, EGB, FAC, and GBD; print No otherwise.
Sample Input 1
ABC
Sample Output 1
No
When S = ABC, S does not equal any of ACE, BDF, CEG, DFA, EGB, FAC, and GBD, so No should be printed.
Sample Input 2
FAC
Sample Output 2
Yes
Sample Input 3
XYX
Sample Output 3
No