Problems
Three identical digits
Three identical digits
Four-digit number is given. Determine if it contains exactly three identical digits.
\InputFile
One four-digit number $n$.
\OutputFile
Print "\textbf{YES}" if number $n$ contains exactly three identical digits, and "\textbf{NO}" otherwise.
Input example #1
2322
Output example #1
YES
Input example #2
2234
Output example #2
NO