output_description: Print the answer.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N P
attempt: def exEuqrid(a, b):
      list = [a, b]
      listx = [1, 0]
      listy = [0, 1]
      while list[1] != 0:
          list.append(list[0] % list[1])
          q = list[0] // list[1]
          listx.append(listx[0] - (q * listx[1]))
          listy.append(listy[0] - (q * listy[1]))
          list.pop(0)
          listx.pop(0)
          listy.pop(0)
      ans = []
      ans.append(listx[0])
      ans.append(listy[0])
      ans.append(list[0])
      return ans
  
  
  x, y = map(int, input().split())
  if x < y:
      z = y
      y = x
      x = z
  print(exEuqrid(x, y)[2])
  
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"}]