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