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$. يقوم ثلاثة لاعبين بتنفيذ حركات بالترتيب $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$): الأعداد الموجودة على اللوح في البداية.

الإخراج

اطبع YES إذا كان بإمكان اللاعبَين $2$ و $3$ التعاون وإجبار اللاعب $1$ على الخسارة، أو 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.