11278: [yosupo] Number Theory - Primality Test
[Creator : ]
Description
Given $Q$ cases. For each case, given a positive integer $N$. Please decide if it's prime.
Input
$Q$
$N_0$
$N_1$
$\vdots$
$N_{Q - 1}$
$N_0$
$N_1$
$\vdots$
$N_{Q - 1}$
Output
Print $Q$ lines. For each line, print `Yes` if $N$ is prime, `No` otherwise.
Constraints
- $1 \leq Q \leq 10^5$
- $1 \leq N \leq 10^{18}$
- $1 \leq N \leq 10^{18}$
Sample 1 Input
6
1
2
3
4
998244353
1000000000000000000
Sample 1 Output
No
Yes
Yes
No
Yes
No