103120: [Atcoder]ABC312 A - Chord

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

Description

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

Input

Output

得分:100分

问题描述

给定一个长度为3的由大写英文字母组成的字符串$S$,如果$S$等于ACEBDFCEGDFAEGBFACGBD之一,则打印Yes;否则打印No

限制条件

  • $S$是一个长度为3的由大写英文字母组成的字符串。

输入

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

$S$

输出

如果$S$等于ACEBDFCEGDFAEGBFACGBD之一,则打印Yes;否则打印No


样例输入1

ABC

样例输出1

No

当$S=$ABC时,$S$不等于ACEBDFCEGDFAEGBFACGBD中的任何一个,因此应打印No


样例输入2

FAC

样例输出2

Yes

样例输入3

XYX

样例输出3

No

HINT

是否给出的字符串之一?

加入题单

算法标签: