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

#SP0000153. Trường hữu hạn và lũy thừa nguyên tố (Older Brother)

HỌC THEO LỘ TRÌNH

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

1 lộ trình

Trường hữu hạn và lũy thừa nguyên tố (Older Brother)

Older Brother

Source: Kattis / BAPC 2016
Version: Phuoc Hung OJ Extended — one dataset per judge run.

Problem Statement

A finite field of order qq exists if and only if q=pkq=p^k for a prime pp and an integer k≥1k\ge1. Given qq, determine whether such a field exists.

Input

One line containing the integer qq.

Output

Print yes if qq is a prime power, otherwise print no.

Subtasks

  • Subtask 1 (20 points): 1≤q≤10001\le q\le 1000.
  • Subtask 2 (30 points): 1≤q≤10000001\le q\le 1000000.
  • Subtask 3 (50 points): 1≤q≤10000000001\le q\le 1000000000.

Example

Input

65536

Output

yes

Explanation

Since 65536=21665536=2^{16}, it is a prime power; hence the answer is yes.