No.36 I Hate Prime Numbers!
タグ : / 解いたユーザー数 485
作問者 :
Problem Statement
Honda has many friends who do competitive programming.
Constantly being told about the charms of prime numbers, Honda has grown sick of them.
So he has decided that, whenever he uses an integer in front of his friends, he will only use integers divisible by something other than "a prime number, 1, or the number itself".
To that end, he has decided to write a program that determines whether a given integer may be used in front of his friends.
Input
N
The integer N that Honda wants to use is given.
(1≤N≤10^14)
Note that the input does not fit in a 32-bit value.
Output
Output YES if N is an integer that may be used in front of his friends, and NO otherwise.
Print a newline at the end of the line.
Sample
Sample 1
Input
30
Output
YES
It is divisible by 10, 15, and so on, so Honda can use this integer.
Sample 2
Input
5
Output
NO
It is not divisible by anything other than 1 and 5, so unfortunately Honda cannot use this integer.
Sample 3
Input
1
Output
NO
1 is not a prime number, but for some reason Honda cannot use it.
Sample 4
Input
16777216
Output
YES
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。