Universal Cup Judging System

Universal Cup

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

On the board, there are $n$ different positive integers $a_1, \dots, a_n$. Three players are making moves in the order $123123123\dots$. In a move, the player chooses two different numbers $x$ and $y$ on the board such that $|x - y|$ is not on the board, and writes $|x - y|$ onto the board ($x$ and $y$ remain on the board as well). The player who can't make a move loses. Can players $2$ and $3$ cooperate so that player $1$ loses?

Input

The first line contains an integer $n$ ($1 \le n \le 10^5$), the number of integers on the board.

The second line contains $n$ distinct integers $a_1, \dots, a_n$ ($1 \le a_i \le 10^9$): the numbers that are on the board initially.

Output

Print YES if players $2$ and $3$ can cooperate and force player $1$ to lose, or NO otherwise.

Examples

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.