#include <iostream>
#include <math.h>
using namespace std;

int main() 
{
    int i=0;
    int count=0;
    int m=0;
    int n=0;
    while(cin>>m>>n)
    {
        if(count)
        {
            cout<<endl;
        }
        count=1;
        int count2=0;
        for(i=m;i<=n;i++)
        {
            int k=i;
            int z=0;
            while(k)
            {
                int x=k%10;
                z+=pow(x,3);
                k/=10;
            }
            if(z==i)
            {
                if(count2)
                {
                    cout<<" "<<i;
                }
                else 
                {
                    cout<<i;
                }
                count2++;
            }
        }
        if(count2==0)
        {
            cout<<"no";
        }
    }
    return 0;
}