Universal Cup Judging System

Universal Cup

Time Limit: 1.0 s Memory Limit: 1024 MB Total points: 100
Statistics

黒板の上に $n$ 個の相異なる正の整数 $a_1, \dots, a_n$ が書かれています。3 人のプレイヤーが $123123123\dots$ の順番で手番を行います。1 回の手番では、プレイヤーは黒板上の 2 つの異なる数 $x$ と $y$ であって $|x - y|$ がまだ黒板に書かれていないものを選び、$|x - y|$ を黒板に書き加えます($x$ と $y$ も黒板に残ります)。操作を行えなくなったプレイヤーの負けとなります。プレイヤー $2$ とプレイヤー $3$ は協力してプレイヤー $1$ を負かすことができますか?

入力

1 行目には、黒板上の整数の個数を表す整数 $n$($1 \le n \le 10^5$)が与えられます。

2 行目には、最初に黒板に書かれている数を表す $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.