問題一覧 > 通常問題

No.2751 429-like Number

レベル : / AI推定難易度 : 800 / 実行時間制限 : 1ケース 4.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 115
作問者 : YY-otter / テスター : Arleen 👑 p-adic
お気に入りにしたユーザー ProblemId : 10911 / 自分の提出
問題文最終更新日: 2024-05-10 18:41:49
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 429 (順位表) の他の問題:

Problem Statement

Yozakura Shaniku, also known as Yoniku, likes $429$.
Yoniku suddenly noticed that it can be factorized into primes as $429=3\times 11\times 13$.
He decided to call a positive integer that has exactly $3$ prime factors, like this $429$, a 429-like Number. Here, prime factors are counted with multiplicity.
Yoniku became curious whether other positive integers are also 429-like Numbers.
Given $Q$ positive integers $A_1,A_2,\dots,A_Q$, determine for him whether each of them is a 429-like Number.

Input

The input is given from standard input in the following format.
$Q$
$A_1$
$A_2$
$\vdots$
$A_Q$

  • $1\leq Q\leq 10^4$
  • $1\leq A_i\leq 10^{10}$
  • All input values are integers.

Output

Print $Q$ lines in total.
On the $i$-th line, print Yes if $A_i$ is a 429-like Number, and No if it is not a 429-like Number.
Also, print a newline at the end.

Sample

Sample 1
Input
1
429
Output
Yes

As stated in the problem statement, $429=3\times 11\times 13$, so $429$ is a 429-like Number.

Sample 2
Input
9
1
2
3
4
5
6
7
8
9
Output
No
No
No
No
No
No
No
Yes
No

Among 1-digit positive integers, only $8$ is a 429-like Number.

Sample 3
Input
1
4294967298
Output
Yes

Input values may not fit in a 32bit integer type.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。