# -*- coding: utf-8 -*-



from sys import stdin



n,x = [int(i) for i in stdin.readline().split()]

limit = int(x ** (1.0/n)) + 1



def factorize(x):

    ans = 1



    p = 2

    if x % p == 0:

        count = 1

        x /= p

        while x % p == 0:

            count += 1

            x /= p

        if count >= n:

            ans = ans * (p ** (count // n))



    for p in range(3, limit, 2):

        if x % p == 0:

            count = 1

            x /= p

            while x % p == 0:

                count += 1

                x /= p

            if count >= n:

                ans = ans * (p ** (count // n))

        if x < p * p:

            break

    return ans



if x == 1:

    print((1))

elif n == 1:

    print(x)

else:

    ans = factorize(x)

    print(ans)
# -*- coding: utf-8 -*-

    

from sys import stdin

    

n,x = [int(i) for i in stdin.readline().split()]

limit = int(x ** (1.0/n)) + 1

    

def devide_counter(x, p):

    count = 1

    x = x // p

    while x % p == 0:

        count += 1

        x = x // p

    return x, count

    

def factorize(x):

    ans = 1

    

    p = 2

    if x % p == 0:

        x, count = devide_counter(x, p)

        if count >= n:

            ans = ans * (p ** (count // n))

    

    for p in range(3, limit, 2):

        if x % p == 0:

            x, count = devide_counter(x, p)

            if count >= n:

                ans = ans * (p ** (count // n))

        if x < p * p:

            break

    return ans

    

if x == 1:

    print((1))

elif n == 1:

    print(x)

else:

    ans = factorize(x)

    print(ans)
# -*- coding: utf-8 -*-
from sys import stdin

n, x = [int(i) for i in stdin.readline().split()]
limit = int(x ** (1.0 / n)) + 1


def factorize(x):
    ans = 1
    p = 2
    if x % p == 0:
        count = 1
        x /= p
        while x % p == 0:
            count += 1
            x /= p
        if count >= n:
            ans = ans * (p ** (count // n))
    for p in range(3, limit, 2):
        if x % p == 0:
            count = 1
            x /= p
            while x % p == 0:
                count += 1
                x /= p
            if count >= n:
                ans = ans * (p ** (count // n))
        if x < p * p:
            break
    return ans


if x == 1:
    print((1))
elif n == 1:
    print(x)
else:
    ans = factorize(x)
    print(ans)

# -*- coding: utf-8 -*-
from sys import stdin

n, x = [int(i) for i in stdin.readline().split()]
limit = int(x ** (1.0 / n)) + 1


def devide_counter(x, p):
    count = 1
    x = x // p
    while x % p == 0:
        count += 1
        x = x // p
    return x, count


def factorize(x):
    ans = 1
    p = 2
    if x % p == 0:
        x, count = devide_counter(x, p)
        if count >= n:
            ans = ans * (p ** (count // n))
    for p in range(3, limit, 2):
        if x % p == 0:
            x, count = devide_counter(x, p)
            if count >= n:
                ans = ans * (p ** (count // n))
        if x < p * p:
            break
    return ans


if x == 1:
    print((1))
elif n == 1:
    print(x)
else:
    ans = factorize(x)
    print(ans)

+def devide_counter(x, p): +    count = 1 +    x = x // p +    while x % p == 0: +        count += 1 +        x = x // p +    return x, count + + -        count = 1 -        x /= p -        while x % p == 0: -            count += 1 -            x /= p +        x, count = devide_counter(x, p) -            count = 1 -            x /= p -            while x % p == 0: -                count += 1 -                x /= p +            x, count = devide_counter(x, p)