Universal Cup Judging System

Universal Cup

実行時間制限: 1.0 s メモリ制限: 1024 MB 満点: 100
統計

Sulla lavagna ci sono $n$ interi positivi diversi $a_1, \dots, a_n$. Tre giocatori effettuano mosse nell'ordine $123123123\dots$. In una mossa, il giocatore sceglie due numeri diversi $x$ e $y$ sulla lavagna tali che $|x - y|$ non sia presente sulla lavagna, e scrive $|x - y|$ sulla lavagna (anche $x$ e $y$ rimangono sulla lavagna). Il giocatore che non può effettuare una mossa perde. Possono i giocatori $2$ e $3$ cooperare in modo che il giocatore $1$ perda?

Input

La prima riga contiene un intero $n$ ($1 \le n \le 10^5$), il numero di interi sulla lavagna.

La seconda riga contiene $n$ interi distinti $a_1, \dots, a_n$ ($1 \le a_i \le 10^9$): i numeri presenti inizialmente sulla lavagna.

Output

Stampa YES se i giocatori $2$ e $3$ possono cooperare e costringere il giocatore $1$ a perdere, oppure NO altrimenti.

Esempi

Input 1

3
1 2 3

Output 1

YES

Input 2

3
1 4 3

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