#include<bits/stdc++.h>
#define ll long long
using namespace std;
#define fast ios_base::sync_with_stdio(0),cin.tie(0);
ll a[205][100];
void ok(){
for(int x=2;x<=200;x++)
a[x][0]=1;
for(int x=2;x<=200;x++){
for(int y=1;y<=60;y++){
a[x][y]=a[x][y-1]*x;
if(a[x][y]>1e18) break;
}
}
}
ll f(ll x,ll y){
ll k=pow(x,y)-1;
return k;
}
void siu(){
ll n;
cin>>n;
ll y=60,kt=0;
for(int x=2;x<=200;x++){
if( x*x-1>=n*(x-1)) break;
while(a[x][y]>n) y--;
if(a[x][y]*x-1==n*(x-1)) {
kt=1;
cout<<x<<" "<<y<<"\n";
return;
}
}
if(kt==0 && n<=200) {
cout<<"-1\n";
return;
}
ll res=1e19;
for(int y=2;y<=7;y++){
ll l=1,r=n;
while(l<=r){
ll x=l+r>>1;
if( f(x,y)>=n*(x-1)){
res=min(res,x);
r=x-1;
}
else l=x+1;
}
}
if(res==1e19){
cout<<-1<<"\n";
return;
}
ll k=1,res1=res;
while(res<n){
k++;
res1*=res;
}
cout<<res<<" "<<k<<"\n";
}
int main(){
fast
ok();
ll t;
siu();
return 0;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KI2RlZmluZSBsbCBsb25nIGxvbmcKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKI2RlZmluZSBmYXN0IGlvc19iYXNlOjpzeW5jX3dpdGhfc3RkaW8oMCksY2luLnRpZSgwKTsKbGwgYVsyMDVdWzEwMF07Cgp2b2lkIG9rKCl7CiAgICBmb3IoaW50IHg9Mjt4PD0yMDA7eCsrKQogICAgICAgIGFbeF1bMF09MTsKCiBmb3IoaW50IHg9Mjt4PD0yMDA7eCsrKXsKICAgZm9yKGludCB5PTE7eTw9NjA7eSsrKXsKICAgICBhW3hdW3ldPWFbeF1beS0xXSp4OwogICAgIGlmKGFbeF1beV0+MWUxOCkgYnJlYWs7CiAgIH0KIH0KCn0KbGwgZihsbCB4LGxsIHkpewogbGwgaz1wb3coeCx5KS0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