stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

#define pb push_back

#define pi (acos(-1))

#define ull  unsigned long long

#define ld long double

///freopen("input.txt","r",stdin);

///freopen("output.txt","w",stdout);

#define M 100000

ll LCM(ll a, ll b)

{

    ll g = __gcd(a,b);

    return (a*b)/g ;

}

string numtostr(ll n)

{

    ostringstream str1 ;

    str1 << n ;

    return str1.str();

}

ll strtonum(string s)

{

    ll x ;

    stringstream str1(s);

    str1 >> x ;

    return x ;

}

string s;

int l,i;

int main(void)

{

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);

    cout.tie(NULL);

    cin>>s;

    l=s.length();

    for(i=0;i<l;++i)

    {

        if(s[i]=='?')

            cout<<'D';

        else

            cout<<s[i];

    }

    cout<<'\n';

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.527799028097109x):
#include <cstdio>



char str[200010];



int main() {

	scanf("%s", str);

	for (int i = 0; str[i]; ++i)

		if (str[i] == '?')

			str[i] = 'D';

	puts(str);

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <string>

#include <stack>

#include <queue>

#include <cmath>



#include <fstream>

#include <vector>

#include <algorithm>



using namespace std;



int main(void)

{



    long long x;

    long long data[3000];

    

    cin >> x;

    

    for(int i = 0; i < 3000; i++)

    {

        data[i] = pow(i, 5);

    }

    

    for(int a = 0; a < 3000; a++)

    {

        for(int b = 0; b < 3000; b++)

        {

            if(data[a] - data[b] == x)

            {

                cout << a << " " << b;

                return 0;

            }

            if(data[a] + data[b] == x)

            {

                cout << a << " " << -b;

                return 0;

            }

            if(-data[a] - data[b] == x)

            {

                cout << -a << " " << b;

                return 0;

            }

            if(-data[a] + data[b] == x)

            {

                cout << -a << " " << -b;

                return 0;

            }

        }

    }

    

  

}

// Faster C++ solution for the same problem (measured speedup: 1.1073894736107817x):
#include <iostream>

#include <string>

#include <stack>

#include <queue>

#include <cmath>

 

#include <fstream>

#include <vector>

#include <algorithm>

 

using namespace std;

 

int main(void)

{

 

    long long x;

    long long data[3000];

    

    cin >> x;

    

    for(int i = 0; i < 300; i++)

    {

        data[i] = pow(i, 5);

    }

    

    for(int a = 0; a < 300; a++)

    {

        for(int b = 0; b < 300; b++)

        {

            if(data[a] - data[b] == x)

            {

                cout << a << " " << b;

                return 0;

            }

            if(data[a] + data[b] == x)

            {

                cout << a << " " << -b;

                return 0;

            }

            if(-data[a] - data[b] == x)

            {

                cout << -a << " " << b;

                return 0;

            }

            if(-data[a] + data[b] == x)

            {

                cout << -a << " " << -b;

                return 0;

            }

        }

    }

    

  

}
// Slower C++ solution:
#include<iostream>

#include<cmath>

#include<stack>

#include<vector>

#include<cstring>

#include<algorithm>

#include<set>

#include<queue>

#include <vector>

#include <list>

#include <map>

#include <set>

#include <deque>

#include <stack>

#include <bitset>

#include <algorithm>

#include <functional>

#include <numeric>

#include <utility>

#include <complex>

#include <sstream>

#include <iomanip>

#include <cstdio>

#include <cmath>

#include <cstdlib>

#include <cstring>

#include <ctime>

#include <cassert>

using namespace std;

typedef long long ll;

const ll inf =1e17;

#define scn(a) scanf("%d",&a)

#define scd(a) scanf("%lf",&a)

#define scl(a) scanf("%lld",&a)

#define ptf(a) printf("%d\n",&a)

#define mes(a,b) memset(a,b,sizeof(a))

#define fon(s,n) for(int i=s;i<=n;i++)

#define range(i,a,b) for(int i=a;i<=b;++i)

#define rerange(i,a,b) for(int i=a;i>=b;--i)

//#define N 100010

const int S=20;

ll gcd(ll a,ll b) { return b>0 ? gcd(b,a%b):a;}

ll lcm(ll a,ll b){return a*b/gcd(a,b);}

ll q_pow(ll a,ll b,ll mod)

{

	ll ans=1,res=a;

	while(b){

		if(b&1) ans=ans*res%mod;

		res=res*res%mod;

		b>>=1;

	}

	return ans%mod;

}

 bool cmp(const pair<string,int> &p1, const pair<string,int> &p2) {

    return p1.second > p2.second;

}

int cnt[105]={0};

int main()

{

    int n;

        scn(n);

	for(int i = -120; i <= 120; i ++) {

		for(int j = -120; j <= 120; j ++) {

			if(pow(i,5) - pow(j,5) == n) {

				printf("%d %d\n",i,j);

				return 0;

			}

		}

	}

}


// Faster C++ solution for the same problem (measured speedup: 2.864483776930616x):
#include <bits/stdc++.h>



using namespace std;



// Main function 

int main() 

{

    long int X;

    cin>>X;

    

    int a = 120, b = 120;

    

    for(int i = -118; i < 120; i++){

        for(int j = -119; j < 118; j++){

            if(i*i*i*i*i - j*j*j*j*j == X){

                a = i;

                b = j;

                break;

            }

        }

        if(a != 120 && b != 120){

            break;

        }

    }

    

    cout<<a<<" "<<b<<endl;

    return 0; 

}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;



int main(void) {

  long long X; cin >> X;

  vector<int> prime;

 

  prime.push_back(1);

  for (int i = 1; i * i <= X; i++) {

    if (X%i == 0) {

      prime.push_back(i);

      prime.push_back(X/i);

    }

  }

  prime.push_back(X);



  for (int i = 0; i < prime.size(); i++) {

    long long b = -1, a = b+prime[i];

    long long c = X/prime[i];

    for (int i = -4800; i < 4800; ++i) {

      if (c == (a+i)*(a+i)*(a+i)*(a+i) + (a+i)*(a+i)*(a+i)*(b+i)

              +(a+i)*(a+i)*(b+i)*(b+i) + (a+i)*(b+i)*(b+i)*(b+i)

              +(b+i)*(b+i)*(b+i)*(b+i)) {

        cout << a+i << " " << b+i << endl;

        return 0;

      }

    }

  }



  return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.2960675398257224x):
#include <bits/stdc++.h>



using namespace std;



int main(void) {

  long long X; cin >> X;

  vector<int> prime;

 

  prime.push_back(1);

  for (int i = 1; i * i <= X; i++) {

    if (X%i == 0) {

      prime.push_back(i);

      prime.push_back(X/i);

    }

  }

  prime.push_back(X);



  for (int i = 0; i < prime.size(); i++) {

    long long b = -1, a = b+prime[i];

    long long c = X/prime[i];

    for (int i = -200; i < 200; ++i) {

      if (c == (a+i)*(a+i)*(a+i)*(a+i) + (a+i)*(a+i)*(a+i)*(b+i)

              +(a+i)*(a+i)*(b+i)*(b+i) + (a+i)*(b+i)*(b+i)*(b+i)

              +(b+i)*(b+i)*(b+i)*(b+i)) {

        cout << a+i << " " << b+i << endl;

        return 0;

      }

    }

  }



  return 0;

}
// Slower C++ solution:
#include <iostream>

#include <bits/stdc++.h>

#include <math.h>

using namespace std;



int main()

{

	long long  i,j,m;

	cin>>m;



	for(i=-140;i<=140;i++)

	{

	    for(j=-140;j<=140;j++)

	    {

	    	if(i*i*i*i*i-j*j*j*j*j==m)

	    	{

			cout<<i<<" "<<j<<endl;

	    	return 0;

		    }

		}

	}

	

	

	

}

// Faster C++ solution for the same problem (measured speedup: 1.1442083204814024x):
#include <iostream>



int main() {

	long long int x;



	std::cin >> x;



	for (long long int i = 0; i <= 1000; ++i)

	{

		for (long long int j = -1000; j <= i-1; ++j) {

			long long int first = i*i*i*i*i;

			long long int second = j*j*j*j*j;



			if (first - second == x) {

				std::cout << i << " " << j;

				return 0;

			}

		}

	}

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;





int main(void){

    // Your code here!

    long long x;

   

    cin>>x;

    

    //bool end=false;

    //int a,b;

    for(int i=0;i<=1000;i++){

      for(int j=-1000;j<=1000;j++){

        if(pow(i,5) - pow(j,5)==x){

          cout<<i<<" "<<j<<endl;

          return 0;

        }

      }

    }

    

}


// Faster C++ solution for the same problem (measured speedup: 1.121756331808919x):
#include <bits/stdc++.h>

using namespace std;





int main(void){

    // Your code here!

    long long x;

   

    cin>>x;

    

    //bool end=false;

    //int a,b;

    for(int i=0;i<=150;i++){

      for(int j=-150;j<=150;j++){

        if(pow(i,5) - pow(j,5)==x){

          cout<<i<<" "<<j<<endl;

          return 0;

        }

      }

    }

    

}
// Slower C++ solution:
#include <bits/stdc++.h>

#define pb push_back

#define int long long

using namespace std;



inline int read()

{

	int sum=0,ff=1; char ch=getchar();

	while(!isdigit(ch))

	{

		if(ch=='-') ff=-1;

		ch=getchar();

	}

	while(isdigit(ch))

		sum=sum*10+(ch^48),ch=getchar();

	return sum*ff;

}



int X;



signed main()

{

	X=read();

	for ( int i=-500;i<=500;i++ ) 

		for ( int j=-500;j<=500;j++ ) 

		{

			int A=i*i*i*i*i;

			int B=j*j*j*j*j;

			if(A-B==X) 

				return printf("%lld %lld\n",i,j),0;

		}

	return 0;

}

			 

// Faster C++ solution for the same problem (measured speedup: 2.2316674865988677x):
#include <bits/stdc++.h>

#define pb push_back

#define int long long

using namespace std;



inline int read()

{

	int sum=0,ff=1; char ch=getchar();

	while(!isdigit(ch))

	{

		if(ch=='-') ff=-1;

		ch=getchar();

	}

	while(isdigit(ch))

		sum=sum*10+(ch^48),ch=getchar();

	return sum*ff;

}



int X;



signed main()

{

	X=read();

	for ( int i=-200;i<=200;i++ ) 

		for ( int j=-200;j<=200;j++ ) 

		{

			int A=i*i*i*i*i;

			int B=j*j*j*j*j;

			if(A-B==X) 

				return printf("%lld %lld\n",i,j),0;

		}

	return 0;

}
// Slower C++ solution:
#include <iostream>



long long pow5(long long x)

{

    return x * x * x * x * x;

}



int main()

{

    long long X;

    std::cin >> X;

    for (long long A = 0; pow5(A) <= 1000000000; A++)

    {

        for (long long B_ = 0; pow5(B_) <= 1000000000; B_++)

        {

            if (pow5(A) + pow5(B_) == X)

            {

                std::cout << A << " " << -B_ << std::endl;

                return 0;

            }

        }

    }

    for (long long A = 0; A <= 178; A++)

    {

        for (long long B = 0; B < A; B++)

        {

            if (pow5(A) - pow5(B) == X)

            {

                std::cout << A << " " << B << std::endl;

                return 0;

            }

        }

    }

}

// Faster C++ solution for the same problem (measured speedup: 5.06747433141296x):
#include<cstdio>

 

int main()

{

	int X;

	scanf("%d", &X);

	for (int A = 0; A < 1000; ++A) {

      	for (int B = -1000; B < A; ++B) {

			if (A * A * A * A * A - B * B * B * B * B == X)

			{

				printf("%d %d", A, B);

				return 0;

            }

		}

    }

}
// Slower C++ solution:
#include <iostream>



int main()

{

    long long X;

    std::cin >> X;

    constexpr int RANGE_MAX = 178;

    long long pow5[RANGE_MAX];

    for (int i = 0; i < RANGE_MAX; i++)

    {

        long x = i;

        pow5[i] = x * x * x * x * x;

    }



    for (int A = 0; pow5[A] <= 1000000000; A++)

    {

        for (int B_ = 0; pow5[B_] <= 1000000000; B_++)

        {

            if (pow5[A] + pow5[B_] == X)

            {

                std::cout << A << " " << -B_ << std::endl;

                return 0;

            }

        }

    }

    for (int A = 0; A < RANGE_MAX; A++)

    {

        for (long long B = 0; B < A; B++)

        {

            if (pow5[A] - pow5[B] == X)

            {

                std::cout << A << " " << B << std::endl;

                return 0;

            }

        }

    }

}


// Faster C++ solution for the same problem (measured speedup: 5.0717851405911505x):
#include<cstdio>

 

int main()

{

	int X;

	scanf("%d", &X);

	for (int A = 0; A < 1000; ++A) {

      	for (int B = -1000; B < A; ++B) {

			if (A * A * A * A * A - B * B * B * B * B == X)

			{

				printf("%d %d", A, B);

				return 0;

            }

		}

    }

}
// Slower C++ solution:
#include <iostream>



long long pow5(long long x)

{

    return x * x * x * x * x;

}



int main()

{

    long long X;

    std::cin >> X;

    for (long long A = 0; pow5(A) <= 1000000000; A++)

    {

        for (long long B_ = 0; pow5(B_) <= 1000000000; B_++)

        {

            if (pow5(A) + pow5(B_) == X)

            {

                std::cout << A << " " << -B_ << std::endl;

                return 0;

            }

        }

    }

    for (long long A = 0; A <= 178; A++)

    {

        for (long long B = 0; B < A; B++)

        {

            if (pow5(A) - pow5(B) == X)

            {

                std::cout << A << " " << B << std::endl;

                return 0;

            }

        }

    }

}

// Faster C++ solution for the same problem (measured speedup: 5.223300848662494x):
#include<cstdio>

 

int main()

{

	int X;

	scanf("%d", &X);

	for (int A = 0; A < 120; ++A) {

      	for (int B = -120; B < A; ++B) {

			if (A * A * A * A * A - B * B * B * B * B == X)

			{

				printf("%d %d", A, B);

				return 0;

            }

		}

    }

}
// Slower C++ solution:
#include <iostream>



int main()

{

    long long X;

    std::cin >> X;

    constexpr int RANGE_MAX = 178;

    long long pow5[RANGE_MAX];

    for (int i = 0; i < RANGE_MAX; i++)

    {

        long x = i;

        pow5[i] = x * x * x * x * x;

    }



    for (int A = 0; pow5[A] <= 1000000000; A++)

    {

        for (int B_ = 0; pow5[B_] <= 1000000000; B_++)

        {

            if (pow5[A] + pow5[B_] == X)

            {

                std::cout << A << " " << -B_ << std::endl;

                return 0;

            }

        }

    }

    for (int A = 0; A < RANGE_MAX; A++)

    {

        for (long long B = 0; B < A; B++)

        {

            if (pow5[A] - pow5[B] == X)

            {

                std::cout << A << " " << B << std::endl;

                return 0;

            }

        }

    }

}


// Faster C++ solution for the same problem (measured speedup: 5.227744216653385x):
#include<cstdio>

 

int main()

{

	int X;

	scanf("%d", &X);

	for (int A = 0; A < 120; ++A) {

      	for (int B = -120; B < A; ++B) {

			if (A * A * A * A * A - B * B * B * B * B == X)

			{

				printf("%d %d", A, B);

				return 0;

            }

		}

    }

}
// Slower C++ solution:
#include <iostream>



long long pow5(long long x)

{

    return x * x * x * x * x;

}



int main()

{

    long long X;

    std::cin >> X;

    for (long long A = 0; pow5(A) <= 1000000000; A++)

    {

        for (long long B_ = 0; pow5(B_) <= 1000000000; B_++)

        {

            if (pow5(A) + pow5(B_) == X)

            {

                std::cout << A << " " << -B_ << std::endl;

                return 0;

            }

        }

    }

    for (long long A = 0; A <= 178; A++)

    {

        for (long long B = 0; B < A; B++)

        {

            if (pow5(A) - pow5(B) == X)

            {

                std::cout << A << " " << B << std::endl;

                return 0;

            }

        }

    }

}

// Faster C++ solution for the same problem (measured speedup: 5.214062364142554x):
#include<cstdio>

 

int main()

{

	int X;

	scanf("%d", &X);

    long pow5[240];

    for (int i = 0; i < 120; i++)

    {

        long x = i;

        pow5[120+i] = x * x * x * x * x;

        pow5[120-i] = -pow5[120+i];

    }

	for (int A = 0; A < 120; ++A) {

      	for (int B = -120; B < A; ++B) {

			if (pow5[120+A] - pow5[120+B] == X)

			{

				printf("%d %d", A, B);

				return 0;

            }

		}

    }

}
// Slower C++ solution:
#include <iostream>



int main()

{

    long long X;

    std::cin >> X;

    constexpr int RANGE_MAX = 178;

    long long pow5[RANGE_MAX];

    for (int i = 0; i < RANGE_MAX; i++)

    {

        long x = i;

        pow5[i] = x * x * x * x * x;

    }



    for (int A = 0; pow5[A] <= 1000000000; A++)

    {

        for (int B_ = 0; pow5[B_] <= 1000000000; B_++)

        {

            if (pow5[A] + pow5[B_] == X)

            {

                std::cout << A << " " << -B_ << std::endl;

                return 0;

            }

        }

    }

    for (int A = 0; A < RANGE_MAX; A++)

    {

        for (long long B = 0; B < A; B++)

        {

            if (pow5[A] - pow5[B] == X)

            {

                std::cout << A << " " << B << std::endl;

                return 0;

            }

        }

    }

}


// Faster C++ solution for the same problem (measured speedup: 5.218497873120995x):
#include<cstdio>

 

int main()

{

	int X;

	scanf("%d", &X);

    long pow5[240];

    for (int i = 0; i < 120; i++)

    {

        long x = i;

        pow5[120+i] = x * x * x * x * x;

        pow5[120-i] = -pow5[120+i];

    }

	for (int A = 0; A < 120; ++A) {

      	for (int B = -120; B < A; ++B) {

			if (pow5[120+A] - pow5[120+B] == X)

			{

				printf("%d %d", A, B);

				return 0;

            }

		}

    }

}
// Slower C++ solution:
#include<iostream>

using namespace std;



 long long cimi(long long x,int n){

 	long long result=1;

 	for(int i=1;i<=n;i++)

 		result*=x;

 	return result;

 }



int main(){

	long long n;

	cin>>n;

	for(long long i=-150;i<150;i++)

		for(long long j=-150;j<150;j++){

			if(cimi(i,5)-cimi(j,5)==n){

				cout<<i<<" "<<j<<endl;

				return 0;

			}

			

		}

}

// Faster C++ solution for the same problem (measured speedup: 1.0997044958563766x):
#include<bits/stdc++.h>

using namespace std;

int main()

{

	ios_base::sync_with_stdio(0); 

	cin.tie(0); 

	cout.tie(0);

	long long n;

	cin>>n;

	long long a[1005];

	for(long long i=0;i<=1000;i++)

	{

		a[i]=pow(i,5);

	}

	long long ct=0;

	for(long long i=0;i<=1000;i++)

	{

		for(long long j=1;j<=1000;j++)

		{

			if(a[i]-a[j]==n)

			{

				cout<<i<<" "<<j;

				ct=1;

				return 0;

			}

		}

		if(ct==0)

		{

			for(long long j=1;j<=1000;j++)

			{

				if(a[i]+a[j]==n)

				{

					cout<<i<<" "<<-j;

					return 0;

				}

			}

		}

	}

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;





int main(){

  

  

  long long x;

  cin>>x;

  int flag = 0;

  int A,B;

  for(int i=-500 ;i<=500;i++){

   for(int j=-500;j<=500;j++){

    long long a=i,b=j;

	A = a;

	B = b;

     for(int k=1;k<=4;k++){

      a = a*i;

       b = b*j;

     }

	 //A =a;

	 //B = b;

     if(a - b == x){

      cout<<A<<" "<<B<<endl;

       return 0;

     }

   }

  }

  //cout<<A<<" "<<B<<endl;

  

  

  

  

 //return 0; 

  

  

}

// Faster C++ solution for the same problem (measured speedup: 2.231410583127965x):
#include<bits/stdc++.h>

using namespace std;





int main(){

  

  

  long long x;

  cin>>x;

  int flag = 0;

  int A,B;

  for(int i=-200 ;i<=200;i++){

   for(int j=-200;j<=200;j++){

    long long a=i,b=j;

	A = a;

	B = b;

     for(int k=1;k<=4;k++){

      a = a*i;

       b = b*j;

     }

	 //A =a;

	 //B = b;

     if(a - b == x){

      cout<<A<<" "<<B<<endl;

       return 0;

     }

   }

  }

  //cout<<A<<" "<<B<<endl;

  

  

  

  

 //return 0; 

  

  

}
// Slower C++ solution:
// ABC166D - I hate Factorization



#include <bits/stdc++.h>

using namespace std;



int main() {

	int X;

	cin >> X;





	for (long long int i = -120; i <= 120; i++) {

		for (long long int j = -120; j <= 120; j++) {

			if (i * i * i * i * i - j * j * j * j * j == X) {

				cout << i << " " << j << endl;

				return 0;

			}

		}

	}



	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 1.1119103954513838x):
// ABC166D - I hate Factorization



#include <bits/stdc++.h>

using namespace std;



#define N 120



int main() {

	unsigned long long int X;

	cin >> X;

	unsigned long long int A[200];



	for (long long int i = 0; i <= N; i++) {

		A[i] = i * i * i * i * i;

	}



	for (int i = 0; i <= N; i++) {

		for (int j = 0; j <= N; j++) {

			if (A[i] - A[j] == X) {

				cout << i << " " << j << endl;

				return 0;

			}

			if (-1 * A[i] - A[j] == X) {

				cout << -1 * i << " " << j << endl;

				return 0;

			}

			if (A[i] + A[j] == X) {

				cout << i << " " << -1 * j << endl;

				return 0;

			}

			if (-1 * A[i] + A[j] == X) {

				cout << -1 * i << " " << -1 * j << endl;

				return 0;

			}

		}

	}



	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <string>

#include <vector>

#include <queue>

#include <deque>

#include <algorithm>

#include <set>

#include <map>

#include <bitset>

#include <cmath>

#include <functional>

#include <iomanip>

#define vll vector<ll>

#define vvvl vector<vvl>

#define vvl vector<vector<ll>>

#define VV(a, b, c, d) vector<vector<d> >(a, vector<d>(b, c))

#define VVV(a, b, c, d) vector<vvl>(a, vvl(b, vll (c, d)));

#define re(c, b) for(ll c=0;c<b;c++)

#define all(obj) (obj).begin(), (obj).end()

typedef long long int ll;

typedef long double ld;

using namespace std;



int main(int argc, char const *argv[]) {

  ll x;std::cin >> x;

  map<ll, ll> mp;

  for(ll i=-2000;i<=2000;i++) mp.emplace(i*i*i*i*i, i);



  for(ll i=-2000;i<=2000;i++){

    ll need = x + i*i*i*i*i;

    if(mp.find(need)!=mp.end()){

      std::cout << mp.at(need) << " " << i << '\n';

      return 0;

    }

  }

  std::cout << "NONE" << '\n';

  return 0;

}


// Faster C++ solution for the same problem (measured speedup: 1.3528801655376674x):
#include <iostream>

#include <string>

#include <vector>

#include <queue>

#include <deque>

#include <algorithm>

#include <set>

#include <map>

#include <bitset>

#include <cmath>

#include <functional>

#include <iomanip>

#define vll vector<ll>

#define vvvl vector<vvl>

#define vvl vector<vector<ll>>

#define VV(a, b, c, d) vector<vector<d> >(a, vector<d>(b, c))

#define VVV(a, b, c, d) vector<vvl>(a, vvl(b, vll (c, d)));

#define re(c, b) for(ll c=0;c<b;c++)

#define all(obj) (obj).begin(), (obj).end()

typedef long long int ll;

typedef long double ld;

using namespace std;



int main(int argc, char const *argv[]) {

  ll x;std::cin >> x;

  for(ll i=-200;i<=200;i++){

    for(ll j=-200;j<=200;j++){

      if(i*i*i*i*i-j*j*j*j*j==x){

        std::cout << i << " " << j << '\n';

        exit(0);

      }

    }

  }

  return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

#define rep(i,b) for(int i=1;i<=b;i++)

#define drep(i,b) for(int i=b;i>=1;i--)

#define Rep(i,a,b) for(int i=a;i<=b;i++)

#define pr pair<int,int>

#define ff first

#define ss second

#define int long long

#define endl '\n'

using namespace std;

const int N=2e5+5;

const int mod=1e9+7;

int n,m,k,t,x,y,z;



int poww(int x,int k) {

    if(k==0) return 1;

    int t=poww(x,k/2);

    if(k&1) return t*t*x;

    else return t*t;

}



void solve(int sum=0) {

    cin>>n;

    Rep(i,-200,200) Rep(j,-200,200) {

        if(poww(i,5)-poww(j,5)==n) {

            cout<<i<<' '<<j<<endl;

            return ;

        }

    }

}



#undef int

int main() {

    ios::sync_with_stdio(false);

    //int T;cin>>T;

    //while(T--)

        solve();

}


// Faster C++ solution for the same problem (measured speedup: 1.2400911336970368x):
#include<bits/stdc++.h>

#include<cmath>

#define ll long long

#define f(i,l,r) for(ll i=l;i<=r;i++)

using namespace std;

int main(){

   ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

   ll X;

   cin >> X;

   ll a[1005] = {0};

   f(i,1,1004) a[i] = pow(i,5);

   bool Y = false;

   f(i,0,1004){

      if(a[i] == X){

          cout << i << " 0";

          return 0;

      }

      else{

         f(j,1,1004) if(a[i] - a[j] == X){

            cout << i << " " << j;

            Y  = true;

            return 0;

         }

         if(Y == false) f(j,1,1004) if(a[i] + a[j] == X){

             cout << i << " " << -j;

             return 0;

         }

      }

   }

   return 0;

}