Universal Cup Judging System

Universal Cup

Limite de temps : 1.0 s Limite de mémoire : 1024 MB Points totaux : 100
Statistiques

칠판 위에 $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.