# Go to Jail SOLUTION AtCoder Beginner Contest 179

Page Contents

## Go to Jail SOLUTION

Problem Statement
Tak played out the accompanying activity N times: moving two dice. The consequence of the I – th roll is
D I , 1 furthermore, D I , 2 . Check if doublets happened at any rate multiple times in succession. In particular, check if there exists at rent one I with the end goal that D I , 1 = D I , 2 , D I + 1 , 1 = D I + 1 , 2 furthermore,
D I + 2 , 1 = D I + 2 , 2 hold. Requirements 3 ≤ N ≤ 100 1 ≤ D I , j ≤ 6 All qualities in input are whole numbers.
Information
Information is given from Standard Input in the accompanying organization:
N D 1 , 1 D 1 , 2 ⋮ D N , 1 D N , 2
Yield
Print Yes if doublets happened in any event multiple times in succession. Print No something else.
Test Input 1
Duplicate
5
1 2
6
4
3
3 2
Test Output 1
Duplicate
Indeed
From the second move to the fourth move, three doublets happened in succession.
Test Input 2
Duplicate
5
1
2
3 4
5
6
Test Output 2
Duplicate
No
Test Input 3
Duplicate
6
1
2
3
4
5
6
Test Output 3
Duplicate
Indeed