100790: [AtCoder]ABC079 A - Good Integer
Memory Limit:256 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Score : $100$ points
Problem Statement
We call a $4$-digit integer with three or more consecutive same digits, such as $1118$, good.
You are given a $4$-digit integer $N$. Answer the question: Is $N$ good?
Constraints
- $1000 ≤ N ≤ 9999$
- $N$ is an integer.
Input
Input is given from Standard Input in the following format:
$N$
Output
If $N$ is good, print Yes
; otherwise, print No
.
Sample Input 1
1118
Sample Output 1
Yes
$N$ is good, since it contains three consecutive $1$.
Sample Input 2
7777
Sample Output 2
Yes
An integer is also good when all the digits are the same.
Sample Input 3
1234
Sample Output 3
No