Problem:
Score : 300 points

Problem 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.

Constraints

1 \leq N \leq 10^{12}

1 \leq P \leq 10^{12}

Input

Input is given from Standard Input in the following format:

N P

Output

Print the answer.

Sample Input 1

3 24

Sample Output 1

2

The greatest common divisor would be 2 when, for example, a_1=2, a_2=6 and a_3=2.

Sample Input 2

5 1

Sample Output 2

1

As a_i are positive integers, the only possible case is a_1 = a_2 = a_3 = a_4 = a_5 = 1.

Sample Input 3

1 111

Sample Output 3

111

Sample Input 4

4 972439611840

Sample Output 4

206

Solution in JavaScript (node.js v5.12) (judge verdict: Runtime Error)

!function(e){var t={};function n(r){if(t[r])return t[r].exports;var u=t[r]={i:r,l:!1,exports:{}};return e[r].call(u.exports,u,u.exports,n),u.l=!0,u.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var u in e)n.d(r,u,function(t){return e[t]}.bind(null,u));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";t.__esModule=!0;var r=n(1),u=n(2),o=r.readFileSync("/dev/stdin","utf8").split("\n");console.log(u.solveC(o))},function(e,t){e.exports=require("fs")},function(e,t,n){"use strict";t.__esModule=!0,t.solve=function(e){var t=e[0],n=e[1],r=e[2],u=Number(t),o=n.split(" ").map(Number);return u+o[0]+o[1]+" "+r},t.solveA=function(e){return e[0].split("").filter(function(e){return"2"===e}).length},t.solveB=function(e){var t=e[0],n=e.slice(1),r=t.split(" ").map(Number),u=(r[0],r[1]),o=r[2];return n.map(function(e){return e.split(" ").map(Number)}).filter(function(e){var t=e[0],n=e[1];return t>=u&&n>=o}).length},t.solveC=function(e){var t,n,r,u,o=e[0].split(" ").map(Number),i=o[0],c=o[1],f=function(){function e(e,t){this.base=e,this.degree=t}return e.prototype.toNumber=function(){return Math.pow(this.base,this.degree)},e}();return(t=c,n=function(e,t,r){return 1===e?r:e%t==0?n(e/t,t,r.concat([t])):n(e,t+1,r)},r=function(e,t,n){if(0===e.length)return n;var u=e[0],o=e.slice(1);if(0===o.length)return n.concat([new f(u,t+1)]);var i=o[0];return o.slice(1),u===i?r(o,t+1,n):r(o,0,n.concat([new f(u,t+1)]))},u=n(t,2,[]),r(u,0,[])).map(function(e){var t=e.base,n=e.degree;return new f(t,Math.floor(n/i))}).map(function(e){return e.toNumber()}).reduce(function(e,t){return e*t},1)}}]);