Under construction

Still being built. Things may change

Older Brother

Interview

Time limit2sMemory limit512 MB

Summary
Given an integer q up to 1e9, decide whether q is a prime power, printing yes or no.
Level

Easy3 of 10

Topics
Number theory, Math
Solved
No attempts yet

Problem

Your older brother is an amateur mathematician with plenty of experience. His memory is bad, though, and he never remembers which finite fields exist. For you this is an easy question. A finite field of order qq exists if and only if qq is a prime power, that is, q=pkq = p^k for some prime pp and some integer k≥1k \ge 1. When such a field exists, it is unique up to isomorphism.

The conversation with your brother went roughly like this.

Input

The input contains one integer qq (1≤q≤1091 \le q \le 10^9).

Output

Print yes if a finite field of order qq exists. Otherwise print no.

Examples3

  1. Example 1

    Input
    1
    
    Expected output
    no
    
  2. Example 2

    Input
    37
    
    Expected output
    yes
    
  3. Example 3

    Input
    65536
    
    Expected output
    yes