Are you sure you want to participate in this contest ?
If you select a team then virtual participation for other team members will be disabled. So, pick one if and only if your teammates are ready to compete with you.
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
The input contains one line with the string S (|S|=4).
Output
If S consists of exactly two kinds of characters which both appear twice in S print "Yes", otherwise print "No" (without the quotes).
Sample test(s)
Input
ASSA
--- Showing first 30 lines (click "Copy" to get full content) ---
Output
Yes
--- Showing first 30 lines (click "Copy" to get full content) ---
Input
STOP
--- Showing first 30 lines (click "Copy" to get full content) ---
Output
No
--- Showing first 30 lines (click "Copy" to get full content) ---
Input
FFEE
--- Showing first 30 lines (click "Copy" to get full content) ---
Output
Yes
--- Showing first 30 lines (click "Copy" to get full content) ---
Input
FREE
--- Showing first 30 lines (click "Copy" to get full content) ---
Output
No
--- Showing first 30 lines (click "Copy" to get full content) ---