while 1:
try:
m, n = map(int, input().split())
flag = 0
for i in range(m, n+1):
tmp = i
sum = 0
while tmp:
sum += (tmp%10)**3
tmp //= 10
if sum == i:
print(i, end=" ")
flag = 1
if flag == 0:
print("no")
except:
break