#include<stdio.h>
int main() {
int m, n, val = 0;
int a, b, c;
while (scanf("%d %d", &m, &n) != EOF) {
for (int i = m; i <= n; i++) {
a = i / 100;
b = i % 100 / 10;
c = i % 10;
if (a * a * a + b * b * b + c * c * c == i) {
printf("%d ", i);
val = 1;
}
}
if (val != 1) printf("no");
val = 0;
printf("\n");
}
return 0;
}
int main() {
int m, n, val = 0;
int a, b, c;
while (scanf("%d %d", &m, &n) != EOF) {
for (int i = m; i <= n; i++) {
a = i / 100;
b = i % 100 / 10;
c = i % 10;
if (a * a * a + b * b * b + c * c * c == i) {
printf("%d ", i);
val = 1;
}
}
if (val != 1) printf("no");
val = 0;
printf("\n");
}
return 0;
}