n=int(input("Enter a Number : ")) c = 0 for i in range(1, n): if n % i == 0: c = c + i if c == n: print(n, "The number is a Perfect number!") else: print(n, "The number is not a Perfect number!")