def perfect_num_chk(n):
    perfect = True
    divisors = [div for div in range(1, n) if n % div == 0]
    if n != sum(divisors):
        perfect = False
    if not perfect:
        return "It's not so perfect."
    return 'We have a perfect number!'


number = int(input())
print(perfect_num_chk(number))

c0d400264d16a298e4cf0b8b9c6a874e1386f403
<mask token>

def perfect_num_chk(n):
    perfect = True
    divisors = [div for div in range(1, n) if n % div == 0]
    if n != sum(divisors):
        perfect = False
    if not perfect:
        return "It's not so perfect."
    return 'We have a perfect number!'


<mask token>

def perfect_num_chk(n):
    perfect = True
    divisors = [div for div in range(1, n) if n % div == 0]
    if n != sum(divisors):
        perfect = False
    if not perfect:
        return "It's not so perfect."
    return 'We have a perfect number!'


<mask token>
print(perfect_num_chk(number))

def perfect_num_chk(n):
    perfect = True
    divisors = [div for div in range(1, n) if n % div == 0]
    if n != sum(divisors):
        perfect = False
    if not perfect:
        return "It's not so perfect."
    return 'We have a perfect number!'


number = int(input())
print(perfect_num_chk(number))
