PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#SP0000001. Kiểm tra số nguyên tố (Primality Test)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Kiểm tra số nguyên tố (Primality Test)

Primality Test

Source: AtCoder

Version: Phuoc Hung OJ Extended

Problem Statement

A prime number is an integer greater than 11 with exactly two positive divisors, 11 and itself. Given an integer NN, determine whether NN is prime.

Input

One line containing the integer NN.

Output

Print Yes if NN is prime; otherwise print No.

Subtasks

  • Subtask 1 (20 points): 2≤N≤10002\le N\le 1000.
  • Subtask 2 (30 points): 2≤N≤1000000002\le N\le 100000000.
  • Subtask 3 (50 points): 2≤N≤100000000000002\le N\le 10000000000000.

Examples

Input

53

Output

Yes

Explanation

The input integer is N=53N=53. It has no divisor other than 11 and itself, so it is prime. Therefore the output is Yes.

Input

77

Output

No

Explanation

The input integer is N=77N=77. It has a proper divisor, so it is not prime. Therefore the output is No.