Programming contests

DEIK Regionális Programozó Csapatverseny, egyetemi/főiskolai kategória, 2017. december 3.

December 3, 2017, 10:10 AM – December 3, 2017, 3:10 PM

L — Older Brother

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).

The conversation with your brother went something like this:

Input Specification

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

Output Specification

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

Sample Input 1

  1. 1
download as text file

Output for Sample Input 1

  1. no
download as text file

Sample Input 2

  1. 37
download as text file

Output for Sample Input 2

  1. yes
download as text file

Sample Input 3

  1. 65536
download as text file

Output for Sample Input 3

  1. yes
download as text file
University of Debrecen; Faculty of Informatics; v. 09/30/2024