#include<stdio.h>
int main() {
    int m=0, n=0;
    
    while (scanf("%d %d", &m, &n) != EOF) {
        
        int flag = 0;//判断输入范围内有无水仙花数
        
        for (int i = m; i <= n; i++) {
  
            //计算当前数i,各个位数立方和
            int sum = 0;
            int j = i; 
            while (j != 0) {
                int x = j % 10;
                x = x * x * x;
                sum += x;
                j /= 10;
            }
            
            //立方和等于当前数时打印,并更改判断条件
            if (sum == i) {
               printf("%d ", sum);
               flag = 1;
             }
             
        }
        
        //没有打印no
        if (flag == 0) {
            printf("no\n");
        }
        
    }
}