#include <stdio.h>
#include <math.h>
using namespace std;
int main() {
int m,n;
bool count = 0;
while(true){
scanf("%d %d",&m,&n);
if(m == 0 && 0 == n){
break;
}
for (int i = m; i <=n ; ++i) {
if(i == (pow((i / 100),3) + pow(((i%100)/10),3) +pow((i%10),3))){
printf("%d ",i);
count = 1;
}
}
if(count == false){
printf("no");
}
count = 0;
printf("\n");
}
return 0;
}