import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int m = sc.nextInt();
int n = sc.nextInt();
boolean isFlag = false; // 是否存在水仙花数
for (int i = m; i <= n ; i++) {
int sum = 0;
String s = String.valueOf(i);
for (int j = 0 ; j < s.length(); j++) {
sum += Math.pow(Integer.valueOf(s.charAt(j) + ""), 3);
}
if (sum == i) {
isFlag = true;
System.out.print(i + " ");
}
}
if (!isFlag) {
System.out.println("no");
} else {
System.out.println();
}
}
}
}