#include <stdio.h>

int main() {
    int a, b,i,j,sum,count;
    while (scanf("%d %d", &a, &b) != EOF) 
    {
        count=0;
        for(i=a;i<=b;i++)
        {
            sum=0;
            for(j=i;j>0;j/=10)
                sum+=(j%10)*(j%10)*(j%10);
            if(sum==i)
            {
                printf("%d ",i);
                count++;
            }
        }
        if(count==0)
        printf("no");
        putchar('\n');
    }
    return 0;
}