AtCoder Beginner Contest 132
翻译中…
Problem Statement
翻译中…
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$.
翻译中…
Constraints
翻译中…
- The length of
$S$is$4$. $S$consists of uppercase English letters.
翻译中…
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.
翻译中…
样例
Input #1
ASSA
Output #1
Yes
$S$ consists of `A` and `S` which both appear twice in $S$.
Input #2
STOP
Output #2
No
Input #3
FFEE
Output #3
Yes
Input #4
FREE
Output #4
No
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。