Type: Default 55ms 256MiB

判断素数II

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Background

本小题与P1415判断素数I是一组题哒,请仔细思考哦~

Description

输入一个数n(1<=n<=10^5),输出它是否是素数。如果是,输出Yes,否则输出No。

Format

Input

多组测数据(T<=10^6),每组有一个数字 n(2<=n<=10^5)。 数据量较大,建议使用scanf 进行读入。

Output

每个测试数据输出”Yes”或”No”(不包含引号)

Samples

2
3
4
5
Yes
Yes
No
Yes

Limitation

50ms, 1024KiB for each test case.

素数筛及快速幂训练

Not Claimed
Status
Done
Problem
7
Open Since
2022-12-22 0:00
Deadline
2022-12-29 23:59
Extension
24 hour(s)