#include <bits/stdc++.h>
using namespace std;
int fun(int mid,int m){
    int ans=1;
    for(int i=1;i<=m;i++){
        ans=ans*mid;
    }
    return ans;
}
int main()
{
    int n,m;
    cin>>n>>m;
    
    int l=0,r=n;
    while(l<=r){
        int mid=l+(r-l)/2;
        if(fun(mid,m)>n){
            r=mid-1;
        }
        else if(fun(mid,m)<n){
            l=mid+1;
        }
        else{
            cout<<mid<<endl;
            return 0;
        }
    }
    cout<<m<<"th root of "<<n<<" is not possible( in integer)"<<endl;
    return 0;
}