from functools import reduce
def sum(a,b):
return a+b
for iin range(2,1001):
l = [1]
for jin range(2,int(i/2+1)):
if i%j ==0:
l.append(j)
if i == reduce(sum,l):
print(i)
print(l)
from functools import reduce
def sum(a,b):
return a+b
for iin range(2,1001):
l = [1]
for jin range(2,int(i/2+1)):
if i%j ==0:
l.append(j)
if i == reduce(sum,l):
print(i)
print(l)