Three identical digits#8620

Three identical digits

1 second
128 megabytes
Very easy

Four-digit number is given. Determine if it contains exactly three identical digits.

Input

One four-digit number .

Output

Print "YES" if number contains exactly three identical digits, and "NO" otherwise.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading