import java.util.Scanner;
import java.util.ArrayList;

public class Main{
    public static void main(String[] args){
        Scanner input =new Scanner(System.in);
        while(input.hasNext()){
            int left =input.nextInt();
            int right = input.nextInt();
            Boolean flag=false;
            for(int i=left;i<=right;i++){
                if(i==(Math.pow(i/100,3)+Math.pow((i%100)/10,3)+Math.pow(i%10,3))){
                    System.out.print(i+" ");
                    flag=true;
                }
            }
            if(flag){
                System.out.println();
            }else{
                System.out.println("no");
            }
        }
    }
}