#include <iostream>
usingnamespace std;
int raise(int base, int power) {
int temp;
temp=base;
int i;
if (power==0)
return 1;
if (base==0)
return 0;
if (power==1)
return base;
for (i=2;i<=power;i++)
base=base*temp;
return base;
}
int main()
{
int x,y;
for (x=0;x<1000;x++)
for (y=0;y<1000;y++)
if (raise(x,3)-5x+10==raise(2,y))
cout << x << " " << y << endl;
return 0;
}