SỐ NGUYÊN TỐ - PRIME

PDF

Submit solution

Points: 10.00
Time limit: 1.0s
Memory limit: 64M
Input: stdin
Output: stdout

Authors:
Problem types
Allowed languages
C, C++, Java, Pascal, Python, Scratch, TEXT

Số nguyên tố là số có đúng ~2~ ước riêng biệt là ~1~ và chính nó.

Yêu cầu

Nhập vào số nguyên ~n~, kiểm tra ~n~ có phải là số nguyên tố không?

Dữ liệu

Một dòng duy nhất, gồm số nguyên ~n~ ~(0\le n\le 10^5)~.

Kết quả

Nếu là số nguyên tố, ghi ra Yes, ngược lại ghi No.

Input 1

16

Output 1

No

Input 2

2

Output 2

Yes

Comments

Please read the guidelines before commenting.


There are no comments at the moment.