#include <iostream>
#include<cmath>
#include<string>
using namespace std;

int main() {
    int a,b;
    while(cin>>a>>b){
        bool st=false;
        for(int i=a;i<=b;++i){
            int c=0,tem=i;
            while(tem){
                c+=pow((tem%10),3);
                tem/=10;
            }
            if(c==i){
                cout<<i<<" ";
                st=true;
            }
        }
        if(!st)cout<<"no";
        cout<<endl;
    }
}
// 64 位输出请用 printf("%lld")