bai=1
shi=0
ge=0
i=0
def shuixian(bai,shi,ge):
shu=bai*100+shi*10+ge
judge=bai**3+shi**3+ge**3
global i
if(shu==judge):
if(i==0):
print(shu,end='')
i=i+1
else:
print(',',shu,end='')
else:
pass
for bai in range(1,9):
ge=0
shi=0
for shi in range(0,9):
ge=0
for ge in range(0,9):
shuixian(bai,shi,ge)