import math
count=0
def judge(n):
a=n%10
b=int(n/10)%10
c=int(n/100)
d=math.pow(a,3)+math.pow(b,3)+math.pow(c,3)
if (n==d):
return True
else:
return False
while True:
try:
m,n=map(int,input().split(' '))
for i in range(m,n+1):
if judge(i):
print(i,end=' ')
count+=1
if count==0:
print('no')
except:
break
count=0
def judge(n):
a=n%10
b=int(n/10)%10
c=int(n/100)
d=math.pow(a,3)+math.pow(b,3)+math.pow(c,3)
if (n==d):
return True
else:
return False
while True:
try:
m,n=map(int,input().split(' '))
for i in range(m,n+1):
if judge(i):
print(i,end=' ')
count+=1
if count==0:
print('no')
except:
break