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$.
The input contains one line with the string $S$ ($|S|=4$).