#include <stdio.h>
int main()
{
int a,b,c,d,e,f,g;
int x = 0;
int y = 1;
while(scanf("%d %d",&a,&b) != EOF){
for (c = a,x = 0;c<=b;c++){
e = c%10;
f = (c/10)%10;
g = (c/100)%10;
//printf("%d/n",g);
if (e*e*e+f*f*f+g*g*g == c){
printf("%d ",c);
x++;
}
}
printf("%c",8);
if(x == 0){
printf("no");
}
printf("\n");
}
return 0;
}
