# Perfect Square
# Tissan Kugathas
# ICS 3U0
# March 22 2019

import math

integer = int(input("Enter a integer: "))

squareroot = math.sqrt(int)

final = squareroot**2

if final == integer:
    print("perfect")
