Universal Cup Judging System

Universal Cup

时间限制: 1.0 s 内存限制: 1024 MB 总分: 100
统计

黑板上有 $n$ 個不同的正整數 $a_1, \dots, a_n$。三名玩家按照 $123123123\dots$ 的順序輪流進行操作。在一次操作中,玩家選擇黑板上兩個不同的數 $x$ 和 $y$,使得 $|x - y|$ 不在黑板上,並將 $|x - y|$ 寫到黑板上($x$ 和 $y$ 也保留在黑板上)。無法進行操作的玩家落敗。玩家 $2$ 和玩家 $3$ 能否合作使玩家 $1$ 落敗?

輸入格式

第一行包含一個整數 $n$($1 \le n \le 10^5$),表示黑板上整數的數量。

第二行包含 $n$ 個互不相同的整數 $a_1, \dots, a_n$($1 \le a_i \le 10^9$):表示最初在黑板上的數字。

輸出格式

如果玩家 $2$ 和玩家 $3$ 可以合作並迫使玩家 $1$ 落敗,請輸出 YES,否則輸出 NO。

範例

輸入 1

3
1 2 3

輸出 1

YES

輸入 2

3
1 4 3

輸出 2

NO

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.