Preparando MOJI

Hexakosioihexekontahexaphobia

2000ms 262144K

Description:

This (unpronounceable) word means simply fear of number 666.

You are given a string of digits. Check whether it is scary for a person suffering from this phobia, i.e., whether it contains number 666 as a substring.

Input:

The input will consist of a single string p. The string contains between 1 and 100 digits ('0'-'9'), inclusive. The string doesn't contain any other characters except digits.

Output:

Output "YES" if given string contains number 666, and "NO" otherwise (quotes for clarity only).

Sample Input:

123098

Sample Output:

NO

Sample Input:

16660

Sample Output:

YES

Sample Input:

1606061

Sample Output:

NO

Note:

Note that 666 must be a contiguous substring of p, not a subsequence (see sample 3).

Informação

Codeforces

Provedor Codeforces

Código CF470B

Tags

*special

Submetido 0

BOUA! 0

Taxa de BOUA's 0%

Datas 09/05/2023 08:53:41

Relacionados

Nada ainda