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.