import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
while(scan.hasNextInt()) {
int m = scan.nextInt();
int n = scan.nextInt();
int x = 0;
for(int i = m; i <= n; i++) {
int a = i / 100;
int b = i / 10 % 10;
int c = i % 10;
if(a * a * a + b * b * b + c * c * c == i) {
System.out.print(i + " ");
x = 1;
} else {
if(i == n && x == 0) {
System.out.println("no");
}
}
}
}
}
}