//zadatak dejavu-e
#include <iostream>
#include <string>
#include <sstream>
using namespace std;
int main(){
    unsigned long long int x,i,b;
    string unos;
    unsigned int y,j;
    bool brk,done(false);
    cin >> unos;
    cin >> y;
    if(y==1){
        cout << unos;
        done=true;
    }
    if(!done){
        istringstream tmp(unos);
        tmp >> x;
        i=1;
        brk=false;
        //stringstream(unos) >> x;
        //cout << x;
        while(i<=x && !brk){
            b=i;
            for(j=1;j<y;j++){
                b=b*i;
            }
            if(b==x){
                cout << i;
                brk=true;
                done=true;
            }
            i++;
        }
    }
    return(0);
}
