
"""simple docstring"""







def     __lowerCAmelCase				(_UpperCamelCase		):
	return sum(i for i in range(1       ,  number // 2 + 1		) if number % i == 0		) == number


if __name__ == "__main__":
							print("""Program to check whether a number is a Perfect number or not...""")
							lowerCamelCase__   					=		int(input("""Enter number: """).strip())
							print(f'{number} is {"" if perfect(number) else "not "}a Perfect Number.')



'''simple docstring'''


import math






def        __lowerCAmelCase       (__lowerCAmelCase      ):
		return math.sqrt(__lowerCAmelCase      ) * math.sqrt(__lowerCAmelCase      ) == num






def        __lowerCAmelCase       (__lowerCAmelCase      ):
		_UpperCAmelCase						:				int	    =					0
		_UpperCAmelCase						:				Tuple	    =					n
		while left <= right:
				_UpperCAmelCase						:				int	    =					(left + right) // 2
				if mid**2 == n:
						return True
				elif mid**2 > n:
						_UpperCAmelCase						:				str	    =					mid - 1
				else:
						_UpperCAmelCase						:				List[str]	    =					mid + 1
		return False


if __name__ == "__main__":
						import doctest

						doctest.testmod()



