100 atcoder#ABC132A. [ABC132A] Fifty-Fifty
[ABC132A] Fifty-Fifty
Score : points
Problem Statement
You are given a -character string consisting of uppercase English letters. Determine if consists of exactly two kinds of characters which both appear twice in .
Constraints
- The length of is .
- consists of uppercase English letters.
Input
Input is given from Standard Input in the following format:
Output
If consists of exactly two kinds of characters which both appear twice in , print Yes
; otherwise, print No
.
ASSA
Yes
consists of A
and S
which both appear twice in .
STOP
No
FFEE
Yes
FREE
No