#include <bits/stdc++.h>
using namespace std;
int main() {
    int m,n;
    while(cin>>m>>n){
        bool judge=false;
        for(int i=m;i<=n;i++){
            int t=0;
            for(int j=i;j;j/=10)t+=pow(j%10,3);
            if(t==i){cout<<t<<" ";judge=true;}
        }
        if(!judge)cout<<"no"<<endl;
        else cout<<endl;
    }
    return 0;
}
// 64 位输出请用 printf("%lld")