You are given a positive integer
. You have to split each digit of into either of two non-empty subsequences or.
For example, if
, some possible values of can be and . Note that, after separating the digits into and, these subsequences are considered as positive integers and thus leading zeros can be omitted.
Let us define a function
. Find out whether it is possible to find two non-empty subsequences and formed out of such that.
Input Format
- First line will contain
- .
Output Format
For each test case, print
if it is possible to find two non-empty subsequences and formed out of such that . Otherwise, print.
You may print each character of the string in uppercase or lowercase (for example, the strings
, , andwill all be treated as identical).
Constraints
Subtasks
- Subtask 1 (100 points): Original constraints.
Sample Input 1
2
10
73452
Sample Output 1
NO
YES
Explanation
Test Case
: The only two possibilities are:
- .
Test Case
: One of the possible ways to split the digits of such thatis:
ConversionConversion EmoticonEmoticon