#include #include using namespace std; unsigned long long int a[10000]; unsigned long long int s[1000000]; unsigned long long int p[1000000]; unsigned long long int pc=1; unsigned long long int gcd(unsigned long long int a, unsigned long long int b) { if (b == 0)return a; return gcd(b, a % b); } void primeFactors(unsigned long long int m) { while (m % 2 == 0) { if(2>pc)pc = 2; s[2]++; m = m/2; p[2]=2; } for (int i = 3; i <= sqrt(m); i = i + 2) { while(m % i == 0) { s[i]++; m = m/i; p[i] = i; if(i>pc)pc = i; } } if(m > 2){s[m]++;if(m>pc)pc=m;p[m] = m;} } int main() { unsigned long long int n,k,m=1,b=1,c,sm; ios_base::sync_with_stdio(false); cin.tie(0); cin>>n>>k; for(int i=0;i>a[i]; m = (m/gcd(m,a[i]))*a[i]; } sm = m; primeFactors(sm); for(unsigned long long int i=0;i<=pc;i++) { if(s[i]!=0) { if(s[i]%k!=0)s[i] = s[i] + (k - s[i]%k); s[i] = s[i]/k; } } for(unsigned long long int i=1;i<=pc;i++) { for(unsigned long long int j=1;j<=s[i];j++) { b = b * p[i]; } } cout<