import math n = int(input('Input an integer:'))
m = int(math.sqrt(n) + 1)
for i in range(2, m):
if n % i == 0:
print('No')
break
else:
print('Yes') #输出结果
#Input an integer:23
#Yes
2023-10-07 21:35:28
import math n = int(input('Input an integer:'))
m = int(math.sqrt(n) + 1)
for i in range(2, m):
if n % i == 0:
print('No')
break
else:
print('Yes') #输出结果
#Input an integer:23
#Yes