Universal Cup Judging System

Universal Cup

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

Trên bảng có $n$ số nguyên dương khác nhau $a_1, \dots, a_n$. Ba người chơi thực hiện các nước đi theo thứ tự $123123123\dots$. Trong một nước đi, người chơi chọn hai số khác nhau $x$ và $y$ trên bảng sao cho $|x - y|$ chưa có trên bảng, rồi viết $|x - y|$ lên bảng ($x$ và $y$ vẫn giữ nguyên trên bảng). Người chơi không thể thực hiện nước đi sẽ thua cuộc. Liệu người chơi $2$ và người chơi $3$ có thể hợp tác để người chơi $1$ thua cuộc hay không?

Dữ liệu vào

Dòng đầu tiên chứa một số nguyên $n$ ($1 \le n \le 10^5$), là số lượng số nguyên trên bảng.

Dòng thứ hai chứa $n$ số nguyên phân biệt $a_1, \dots, a_n$ ($1 \le a_i \le 10^9$): các số có trên bảng lúc ban đầu.

Dữ liệu ra

Hãy in ra YES nếu người chơi $2$ và người chơi $3$ có thể hợp tác và buộc người chơi $1$ phải thua, hoặc in ra NO trong trường hợp ngược lại.

Ví dụ

Dữ liệu vào 1

3
1 2 3

Dữ liệu ra 1

YES

Dữ liệu vào 2

3
1 4 3

Dữ liệu ra 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.