Universal Cup Judging System

Universal Cup

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

På tavlan finns $n$ olika positiva heltal $a_1, \dots, a_n$. Tre spelare gör drag i ordningen $123123123\dots$. I ett drag väljer spelaren två olika tal $x$ och $y$ på tavlan sådana att $|x - y|$ inte finns på tavlan, och skriver $|x - y|$ på tavlan ($x$ och $y$ står också kvar på tavlan). Den spelare som inte kan göra ett drag förlorar. Kan spelare $2$ och $3$ samarbeta så att spelare $1$ förlorar?

Indata

Den första raden innehåller ett heltal $n$ ($1 \le n \le 10^5$), antalet heltal på tavlan.

Den andra raden innehåller $n$ olika heltal $a_1, \dots, a_n$ ($1 \le a_i \le 10^9$): talen som finns på tavlan från början.

Utdata

Skriv ut YES om spelare $2$ och $3$ kan samarbeta och tvinga spelare $1$ att förlora, eller NO annars.

Exempel

Indata 1

3
1 2 3

Utdata 1

YES

Indata 2

3
1 4 3

Utdata 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.