QOJ.ac

QOJ

時間限制: 1 s 記憶體限制: 64 MB 總分: 100

#805. 拍卖

统计

著名的游艇公司“Boats, boats, boats”决定采用所谓的配对拍卖方式来增加销售额。这种拍卖只有两名顾客参与,其流程与传统拍卖不同。游艇的初始价格为 1 卢布,在随后的每一步中,其中一名顾客会将当前价格乘以一个 2 到 9 之间的整数。竞价过程持续进行,直到当前价格超过预先已知的 $n$ 卢布为止。因此,最后一次出价的顾客将以 1 卢布的价格买下游艇,而另一名顾客则需要支付全额游艇价格 $n$ 卢布。

你是一位富豪,决定参加 $t$ 场配对拍卖。因此,你的财务经理需要根据已知的游艇实际价格 $n_i$ 来确定每场拍卖的结果。结果是指在双方都采取最优策略的情况下,你是否有机会以 1 卢布的价格买下游艇。此外,你总是先开始配对拍卖,即在第一轮中由你增加价格。

输入格式

第一行包含一个正整数 $t$,表示你参加的配对拍卖场数。 接下来的 $t$ 行,每行包含一个正整数 $n_i$,表示每场拍卖中游艇的实际价格。

$$1 \le t \le 42$$ $$2 \le n_i \le 10^{18}$$

输出格式

你需要输出 $t$ 行字符串。如果能在拍卖中以 1 卢布买下游艇,则输出 “YES”(不含引号),否则输出 “NO”。

样例

样例输入 1

1
42

样例输出 1

YES

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.