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

int  choosemax(int a, int b) {
    if (a < b)  return b;
    else  return a;
}
int  choosemin(int a, int b) {
    if (a < b)  return a;
    else  return b;
}

int main() {
    int a, b, low, high, m, n, k;
    int flag = 0;
    while (cin >> a >> b) {  //多组输入示例
        high = choosemax(a, b);
        low = choosemin(a, b);
        for (int i = low; i <= high; i++) {
            m = i / 100;
            n = i % 100 / 10;
            k = i % 10;
            if (i == pow(m, 3) + pow(k, 3) + pow(n, 3)) {
                printf("%d ", i);
                flag = 1;
            }

        }
        if (flag == 0) printf("no\n");
    }
}
// 64 位输出请用 printf("%lld")