#include<math.h>
#include<stdio.h>
int Check_Flowers(int i)
{
int sum = 0,tmp=0;
tmp = i;
while (i)
{
sum += pow(i%10, 3);
i = i / 10;
}
if (sum == tmp)
return tmp;
else
return 0;
}
int main()
{
int m = 0, n = 0,flag=0;
while (scanf("%d %d", &m, &n) != EOF)
{
for (int i = m; i <= n; i++)
{
if (Check_Flowers(i))
{
printf("%d ", i);
flag++;
}
if ((i == n)&&(flag!=0))
printf("\n");
}
if (flag == 0)
printf("no\n");
}
return 0;
}