#include <stdio.h>
#include <math.h>
int main()
{
int m;
int bai=0;
int shi=0;
int ge=0;
int you=0;
for(m=100;m<=999;m++)
{
bai=m/100;
shi=(m%100)/10;
ge=m%10;
you=pow(bai,3)+pow(shi,3)+pow(ge,3);
if(m==you)
printf("%d ",m);
}
return 0;
}