#include<stdio.h>
int main()
{
int m, n, a, b, c,k,s;
while (scanf("%d%d", &m, &n) != EOF)
{
k=0;
for (; m <= n; m++)
{
s = 0;
a = m % 10;
b = (m / 10) % 10;
c = m / 100;
s= a * a * a + b * b * b + c * c * c;
if(m==s)
{
if(k==0)
printf("%d",m);
else
printf(" %d",m);
k++;
}
}
if (k == 0)
printf("no\n");
else
printf("\n");
}
return 0;
}