Card Game 2
InterviewTime limit2sMemory limit1024 MB
Given N card values, determine whether some integer x exists such that cards with values x, x+3, and x+6 all appear.
문제
Bitaro has cards. The -th card () has an integer written on it. Bitaro wants to pick three of these cards that satisfy the following condition.
Condition: The integers written on the chosen cards are 3 apart. Precisely, they can be written as for some integer .
Given the cards Bitaro has, write a program that determines whether three cards can be chosen to satisfy the condition.
입력
N
A_1 A_2 \ldots A_N
출력
Print Yes if three cards can be chosen to satisfy the condition, and No otherwise.
제한
- .
- ().
- All input values are integers.