output_description: Print the answer.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N P
attempt: import sys
  import collections
  
  input_methods = ["clipboard", "file", "key"]
  using_method = 0
  input_method = input_methods[using_method]
  
  tin = lambda: map(int, input().split())
  lin = lambda: list(tin())
  mod = 1000000007
  
  # +++++
  
  
  def main():
      # a = int(input())
      n, p = tin()
      # s = input()
      bb = collections.defaultdict(lambda: 0)
      tp = p
      for i in range(2, p):
          if tp % i == 0:
              while tp % i == 0:
                  bb[i] += 1
                  tp = tp // i
  
          if i * i > tp:
              bb[tp] += 1
              break
  
      rr = 1
      for k in bb:
          # pa((k, bb[k]))
          if bb[k] >= n:
              rr *= k ** (bb[k] // n)
      print(rr)
  
  
  # +++++
  isTest = False
  
  
  def pa(v):
      if isTest:
          print(v)
  
  
  def input_clipboard():
      import clipboard
  
      input_text = clipboard.get()
      input_l = input_text.splitlines()
      for l in input_l:
          yield l
  
  
  if __name__ == "__main__":
      if sys.platform == "ios":
          if input_method == input_methods[0]:
              ic = input_clipboard()
              input = lambda: ic.__next__()
          elif input_method == input_methods[1]:
              sys.stdin = open("inputFile.txt")
          else:
              pass
          isTest = True
      else:
          pass
          # input = sys.stdin.readline
  
      ret = main()
      if ret is not None:
          print(ret)
  
problem_description: Statement
  
  There are N integers a_1, a_2, ..., a_N not less than 1. The values of a_1,
  a_2, ..., a_N are not known, but it is known that a_1 \times a_2 \times ...
  \times a_N = P.
  
  Find the maximum possible greatest common divisor of a_1, a_2, ..., a_N.
samples: [{"input": "3 24", "output": "2\n    \n\nThe greatest common divisor would be 2 when, for example, a_1=2, a_2=6 and\na_3=2.\n\n* * *"}, {"input": "5 1", "output": "1\n    \n\nAs a_i are positive integers, the only possible case is a_1 = a_2 = a_3 = a_4\n= a_5 = 1.\n\n* * *"}, {"input": "1 111", "output": "111\n    \n\n* * *"}, {"input": "4 972439611840", "output": "206"}]