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