Problem10204--ABC132 - A - Fifty-Fifty

10204: ABC132 - A - Fifty-Fifty

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 512 MiB

Description

You are given a $4$\-character string $S$ consisting of uppercase English letters. Determine if $S$ consists of exactly two kinds of characters which both appear twice in $S$.

Input

Input is given from Standard Input in the following format:

```
$S$
```

Output

If $S$ consists of exactly two kinds of characters which both appear twice in $S$, print `Yes`; otherwise, print `No`.

Constraints

-   The length of $S$ is $4$.
-   $S$ consists of uppercase English letters.

Sample 1 Input

ASSA

Sample 1 Output

Yes
S consists of A and S which both appear twice in S.

Sample 2 Input

STOP

Sample 2 Output

No

Sample 3 Input

FFEE

Sample 3 Output

Yes

FREE

No

Source/Category