zju2725

Digital Deletions

Time limit: 1 Seconds

Memory limit: 32768K

Digital deletions is a two-player game. The rule of the game is as following.

2725_1.gif

2725_2.gif

Now, given a initial string, try to determine can the first player win if the two players play optimally both.

1. Input

The input consists of several test cases. For each case, there is a string in one line.

The length of string will be in the range of [1,6]. The string contains only digit characters.

Proceed to the end of file.

2. Output

Output Yes in a line if the first player can win the game, otherwise output No.

3. Sample Input

0
00
1
20

4. Sample Output

Yes
Yes
No
No

Author: ZHENG, Jianqiang

Problem Source: Zhejiang University Local Contest 2006, Preliminary


http://acm.zju.edu.cn/show_problem.php?pid=2725

zju2725 (2008-02-23 15:35:19由localhost编辑)