Two identical digits#8621

Two identical digits

1 second
128 megabytes
Very easy

A four-digit number is given. Determine whether it contains exactly two different digits, each of these digits must occur twice. For example, the numbers and satisfy this condition.

Input

One four-digit number.

Output

Print "YES" if the number satisfies the specified condition, and "NO" otherwise.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading