def is_prefect(n): m = int(n**0.5) + 1 sum_ti = 1 for i in range(2, m): if n%i==0: sum_ti+=i sum_ti+= n//i return sum_ti==n inp = i...