#abc350a. A - Past ABCs

A - Past ABCs

Score: 100100 points

问题陈述

给定一个长度为6的字符串 SS。保证 SS 的前三个字符是 ABC,后三个字符是数字。

确定 SS 是否是在这个比赛开始之前在AtCoder上举行并结束的比赛的缩写。

这里,如果一个字符串 TT 是“在这个比赛开始之前在AtCoder上举行并结束的比赛的缩写”,当且仅当它等于以下 348348 个字符串中的一个:

ABC001, ABC002, \ldots, ABC314, ABC315, ABC317, ABC318, \ldots, ABC348, ABC349

注意,ABC316 不包括在内。

以上为大语言模型 kimi 翻译,仅供参考。

Problem Statement

You are given a string SS of length 66. It is guaranteed that the first three characters of SS are ABC and the last three characters are digits.

Determine if SS is the abbreviation of a contest held and concluded on AtCoder before the start of this contest.

Here, a string TT is "the abbreviation of a contest held and concluded on AtCoder before the start of this contest" if and only if it equals one of the following 348348 strings:

ABC001, ABC002, \ldots, ABC314, ABC315, ABC317, ABC318, \ldots, ABC348, ABC349.

Note that ABC316 is not included.

Constraints

  • SS is a string of length 66 where the first three characters are ABC and the last three characters are digits.

Input

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

SS

Output

If SS is the abbreviation of a contest held and concluded on AtCoder before the start of this contest, print Yes; otherwise, print No.

Sample Input 1

ABC349

Sample Output 1

Yes

ABC349 is the abbreviation of a contest held and concluded on AtCoder last week.

Sample Input 2

ABC350

Sample Output 2

No

ABC350 is this contest, which has not concluded yet.

Sample Input 3

ABC316

Sample Output 3

No

ABC316 was not held on AtCoder.