Codeforces Round 1021 (Div. 2)
C
Sports Betting
Codeforces
未评级
原题
← BD →
翻译中…

The boarding process for various flights can occur in different ways: either by bus or through a telescopic jet bridge. Every day, exactly one flight is made from St. Petersburg to Minsk, and Vadim decided to demonstrate to the students that he always knows in advance how the boarding will take place.

翻译中…

Vadim made a bet with $n$ students, and with the $i$-th student, he made a bet on day $a_i$. Vadim wins the bet if he correctly predicts the boarding process on both day $a_i+1$ and day $a_i+2$.

翻译中…

Although Vadim does not know in advance how the boarding will occur, he really wants to win the bet at least with one student and convince him of his predictive abilities. Check if there exists a strategy for Vadim that allows him to guarantee success.

翻译中…

Input

翻译中…

Each test contains multiple test cases. The first line contains the number of test cases $t$ ($1 \le t \le 10^4$). The description of the test cases follows.

翻译中…

The first line of each test case contains a single integer $n$ ($1 \le n \le 10^5$) — the number of students Vadim made bets with.

翻译中…

The second line of each test case contains $n$ integers $a_1, \ldots, a_n$ ($1 \le a_i \le 10^9$) — the days on which Vadim made bets with the students.

翻译中…

It is guaranteed that the sum of $n$ over all test cases does not exceed $10^5$.

翻译中…

Output

翻译中…

For each test case, output "Yes" (without quotes) if Vadim can guarantee convincing at least one student, and "No" otherwise.

翻译中…

You can output the answer in any case (upper or lower). For example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as positive responses.

翻译中…

Note

翻译中…

In the first test case, Vadim needs to make at least one correct prediction about the boarding process on the second and third days. There are a total of $4$ possible boarding scenarios for these days, so Vadim can give all $4$ students different predictions and guarantee that at least one of them will be correct.

翻译中…

In the second test case, Vadim only made bets with three students and cannot guarantee that he will provide at least one of them with a correct prediction.

翻译中…

样例

Input #1
5
4
1 1 1 1
3
2 2 2
5
2 4 3 2 4
8
6 3 1 1 5 1 2 6
1
1000000000
Output #1
Yes
No
Yes
No
No
InputCopy OutputCopy
题目信息
题号
2098C
时间限制
2 s
内存限制
256 MB

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。