[BOJ 13469] Older Brother

View as PDF

Submit solution

Points: 2
Time limit: 2.0s
Memory limit: 512M

Problem types
Allowed languages
Assembly, Awk, C, C++, Java, Pascal, Perl, Python, Sed, Text

Your older brother is an amateur mathematician with lots of experience. However, his memory is very bad. He recently got interested in linear algebra over finite fields, but he does not remember exactly which finite fields exist. For you, this is an easy question: a finite field of order q exists if and only if q is a prime power, that is, q = pk holds for some prime number p and some integer k ≥ 1. Furthermore, in that case the field is unique (up to isomorphism).</p>

The conversation with your brother went something like this:

입력 형식

The input consists of one integer q, satisfying 1 ≤ q ≤ 109.

출력 형식

Output “yes” if there exists a finite field of order q. Otherwise, output “no”.

예제 입력 1

1

예제 출력 1

no

예제 입력 2

37

예제 출력 2

yes

예제 입력 3

65536

예제 출력 3

yes

Comments

There are no comments at the moment.