Codeforces Beta Round 83 (Div. 2 Only)
B
Datatypes
Codeforces
1400
原题
← AC →
翻译中…

Tattah's youngest brother, Tuftuf, is new to programming.

翻译中…

Since his older brother is such a good programmer, his biggest dream is to outshine him. Tuftuf is a student at the German University in Cairo (GUC) where he learns to write programs in Gava.

翻译中…

Today, Tuftuf was introduced to Gava's unsigned integer datatypes. Gava has $*n*$ unsigned integer datatypes of sizes (in bits) $*a*_{1}, *a*_{2}, ... *a*_{*n*}$. The $*i*$-th datatype have size $*a*_{*i*}$ bits, so it can represent every integer between $0$ and $2^{*a*_{*i*}} - 1$ inclusive.

翻译中…

Tuftuf is thinking of learning a better programming language. If there exists an integer $*x*$, such that $*x*$ fits in some type $*i*$ (in $*a*_{*i*}$ bits) and $*x*·*x*$ does not fit in some other type $*j*$ (in $*a*_{*j*}$ bits) where $*a*_{*i*} < *a*_{*j*}$, then Tuftuf will stop using Gava.

翻译中…

Your task is to determine Tuftuf's destiny.

翻译中…

Input

翻译中…

The first line contains integer $*n*$ ($2 ≤ *n* ≤ 10^{5}$) — the number of Gava's unsigned integer datatypes' sizes. The second line contains a single-space-separated list of $*n*$ integers ($1 ≤ *a*_{*i*} ≤ 10^{9}$) — sizes of datatypes in bits. Some datatypes may have equal sizes.

翻译中…

Output

翻译中…

Print "YES" if Tuftuf will stop using Gava, and "NO" otherwise.

翻译中…

Note

翻译中…

In the second example, $*x* = 7$ $(111_{2})$ fits in $3$ bits, but $*x*^{2} = 49$ $(110001_{2})$ does not fit in $4$ bits.

翻译中…

样例

Input #1
3
64 16 32
Output #1
NO
InputCopy OutputCopy
Input #2
4
4 2 1 3
Output #2
YES
InputCopy OutputCopy
题目信息
题号
108B
时间限制
2 s
内存限制
256 MB
标签
数学
排序

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。