#include<iostream>#include<cstring>#include<algorithm>usingnamespace std;boolcheck(int x){int sum =0, y = x;while(x){int t = x %10;
x /=10;
sum += t * t * t;}return sum == y;}intmain(){int m, n;while(cin >> m >> n, m){int cnt =0;for(int i = m; i <= n; i ++)if(check(i)){
cout << i <<' ';
cnt ++;}if(!cnt) cout <<"no";
cout << endl;}return0;}