现在的位置: 首页 > 综合 > 正文

113. Nearly prime numbers

2018年01月22日 ⁄ 综合 ⁄ 共 637字 ⁄ 字号 评论关闭


113. Nearly prime numbers

time limit per test: 0.25 sec.
memory limit per test: 4096 KB

Nearly prime number is an integer positive number for which it is possible to find such primesP1 and
P2 that given number is equal to P1*P2. There is given a sequence on
N integer positive numbers, you are to write a program that prints “Yes” if given number is nearly prime and “No” otherwise.

Input

Input file consists of N+1 numbers. First is positive integerN (1£N£10). NextN numbers followed by
N. Each number is not greater than 109. All numbers separated by whitespace(s).

Output

Write a line in output file for each number of given sequence. Write “Yes” in it if given number is nearly prime and “No” in other case.

Sample Input

1
6

Sample Output

Yes

判断一个数能否由两个素数相乘得到  6由2*3得到
【上篇】
【下篇】

抱歉!评论已关闭.