#include <iostream>
using namespace std;
int main()
{
int m,n;
cin>>m>>n;
int num=0;
int a=0;
int b=0;
int c=0;
cin>>num;
for(int i = m;i<=n;i++)
{
a=i%10;
b=i/10%10;
c=i/100;
if(a*a*a+b*b*b+c*c*c == i)
{
num++;
cout<<i<<" ";
}
}
if(num == 0)
{
cout<<"no";
}
return 0;
}