#abc312a. A - Chord

A - Chord

Score : 100100 points

问题描述

给定一个长度为33的由大写英文字母组成的字符串SS,如果SS等于以下字符串中的任意一个:ACEBDFCEGDFAEGBFACGBD,则输出 Yes;否则输出 No

以上为通义千问 qwen-max 翻译,仅供参考。

Problem Statement

Given a length-33 string SS consisting of uppercase English letters, print Yes if SS equals one of ACE, BDF, CEG, DFA, EGB, FAC, and GBD; print No otherwise.

Constraints

  • SS is a length-33 string consisting of uppercase English letters.

Input

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

SS

Output

Print Yes if SS equals one of ACE, BDF, CEG, DFA, EGB, FAC, and GBD; print No otherwise.

Sample Input 1

ABC

Sample Output 1

No

When S=S = ABC, SS 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

update @ 2024/3/10 08:52:46