#include<stdio.h>
#include<math.h>
int main(void)
{
int m,n;
int i;
int a[1000];
while (scanf("%d%d",&m,&n)!=EOF){
for(i=m;i<n;i++){
scanf("%d",a[i]);
}
if(a[i]==pow(a[i]/100,3)+pow((a[i]%100)/10,3)+pow(a[i]%10,3))
printf("%d",a[i]);
else
printf("no");
}
return 0;
}