program CADDiB2018C
    implicit none
    integer(8)::N,P,Ps,i,i_cnt,ans=1
    read*,N,P
    Ps=int(sqrt(real(P)))+1
    do i=2,Ps
        if(mod(P,i)==0)then
            i_cnt=0
            do
                if(mod(P,i)/=0)exit
                P=P/i
                i_cnt=i_cnt+1
            end do
            ans=ans*(i**(i_cnt/N))
        end if
    end do
    ans=ans*(P**(1/N))
    print'(i0)',ans
end program CADDiB2018C