9155: ABC281 —— B - Sandwich Number
[Creator : ]
Description
You are given a string $S$ consisting of uppercase English letters and digits. Determine whether $S$ satisfies the following condition.
- $S$ is a concatenation of the following characters and string in the order listed.
- An uppercase English letter
- A string of length $6$ that is a decimal representation of an integer between $100000$ and $999999$, inclusive
- An uppercase English letter
- $S$ is a concatenation of the following characters and string in the order listed.
- An uppercase English letter
- A string of length $6$ that is a decimal representation of an integer between $100000$ and $999999$, inclusive
- An uppercase English letter
Input
The input is given from Standard Input in the following format:
```
$S$
```
```
$S$
```
Output
If $S$ satisfies the condition in the problem statement, print `Yes`; otherwise, print `No`.
Constraints
- $S$ consists of uppercase English letters and digits.
- The length of $S$ is between $1$ and $10$, inclusive.
- The length of $S$ is between $1$ and $10$, inclusive.
Sample 1 Input
Q142857Z
Sample 1 Output
Yes
S is a concatenation of Q, 142857, and Z in this order.
Q and Z are uppercase English letters, and 142857 is a string of length 66 that is a decimal representation of an integer between 100000 and 999999, so S satisfies the condition.
Q and Z are uppercase English letters, and 142857 is a string of length 66 that is a decimal representation of an integer between 100000 and 999999, so S satisfies the condition.
Sample 2 Input
AB912278C
Sample 2 Output
No
AB is not an uppercase English letter, so S does not satisfy the condition.
Sample 3 Input
X900000
Sample 3 Output
No
The last character of S is not an uppercase English letter, so S does not satisfy the condition.
K012345K
No
012345 is not a string of length 6 that is a decimal representation of an integer between 100000 and 999999, so S does not satisfy the condition.
HINT
相同题目:ABC281。