問題一覧 > 通常問題

No.36 I Hate Prime Numbers!

レベル : / AI推定難易度 : 575 / 実行時間制限 : 1ケース 5.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 485
作問者 : scache
お気に入りにしたユーザー ProblemId : 27 / 自分の提出
問題文最終更新日: 2026-06-25 04:37:11
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 35 (順位表) の他の問題:

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もしくは右上の雲マークをクリックしてアカウントを作成してください。