!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)}}]);