#include <stdio.h>
#include <math.h>

int main() {
    int m, n, flag = 0;
    while (scanf("%d %d", &m, &n) != EOF) {
        for (int i = m; i <= n; i++) {
            int sum = 0;
            int tmp = i;
            for (int j = 0; j < 3; j++) {
                sum += pow(tmp % 10, 3);
                tmp /= 10;
            }
            if (sum == i) {
                flag = 1;
                printf("%d ", i);
            }
        }
        if (flag == 0)
            printf("no\n");
        else
            printf("\n");
    }
    return 0;
}