main = do
    [n,p] <- ((fmap read . words) <$> getLine) :: IO [Int]
    let mbi = ceiling $ nroot n (maxBound::Int)
    print $ solve mbi n p (ceiling $ nroot n p)


nroot :: Int -> Int -> Double
nroot n x = ((fromIntegral x) ** (1/(fromIntegral n)))

solve :: Int -> Int -> Int -> Int -> Int
solve _   1 p _  = p
solve mbi n p ac =
    case ac < mbi && ac^n <= p && p `mod` ac^n == 0 of
        True  -> ac
        False -> solve mbi n p (ac - 1)