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