e-olymp
Competitions

Functions

Power of Cryptography

Given an integer n1 and an integer p1 you are to write a program that determines prb1205, the positive n-th root of p. There always exists such integer k that kn= p.

Input

Consists of two numbers n and p (1n300, 1p10100). It is known that there always exists an integer k (1k109) such that kn = p.

Output

Print the value prb1205, i.e. the number k such that kn = p.

Time limit 1 second
Memory limit 122.17 MiB
Input example #1
2 16
Output example #1
4
Input example #2
3 27
Output example #2
3
Input example #3
7 4357186184021382204544
Output example #3
1234