Let's solve the geometric problem

Mr. A is still solving geometric problems today. It is important to be aware of floating point errors when solving geometric problems.

Floating-point error is the error caused by the rounding that occurs when representing a number in binary finite decimal numbers. For example, 0.1 in decimal is an infinite decimal number of 0.00011001100110011 ... in binary, but an error occurs when rounding this to a finite number of digits.

Positive integers p and q are given in decimal notation. Find the b-ary system (b is an integer greater than or equal to 2) so that the rational number p / q can be expressed as a decimal number with a finite number of digits. If there are more than one, output the smallest one.

Constraints

* 0 <p <q <10 ^ 9



Input Format

Input is given from standard input in the following format.


p q


Output Format

Print the answer in one line.

Sample Input 1


1 2


Sample Output 1


2


1/2 is binary 0.1

Sample Input 2


21 30


Sample Output 2


Ten


21/30 is 0.7 in decimal





Example

Input

1 2


Output

2
#include <bits/stdc++.h>
using namespace std;

using VI = vector<int>;
using VVI = vector<VI>;
using PII = pair<int, int>;
using LL = long long;
using VL = vector<LL>;
using VVL = vector<VL>;
using PLL = pair<LL, LL>;
using VS = vector<string>;

#define ALL(a)  begin((a)),end((a))
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define SZ(a) int((a).size())
#define SORT(c) sort(ALL((c)))
#define RSORT(c) sort(RALL((c)))
#define UNIQ(c) (c).erase(unique(ALL((c))), end((c)))

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

#define FF first
#define SS second
template<class S, class T>
istream& operator>>(istream& is, pair<S,T>& p){
  return is >> p.FF >> p.SS;
}
template<class S, class T>
ostream& operator<<(ostream& os, const pair<S,T>& p){
  return os << p.FF << " " << p.SS;
}
template<class T>
void maxi(T& x, T y){
  if(x < y) x = y;
}
template<class T>
void mini(T& x, T y){
  if(x > y) x = y;
}


const double EPS = 1e-10;
const double PI  = acos(-1.0);
const LL MOD = 1e9+7;

LL gcd(LL x, LL y){
  if(y == 0) return x;
  return gcd(y, x%y);
}

int main(){
  cin.tie(0);
  ios_base::sync_with_stdio(false);

  LL p, q; cin >> p >> q;
  LL g = gcd(p,q);
  LL n = q / g;
  LL ans = 1;
  LL ub = n;
  for(LL i=2;i*i<=ub;++i){
	if(n % i == 0)
	  ans *= i;
	while(n % i == 0) n /= i;
  }
  if(n > 1) ans *= n;
  
  cout << ans << endl;

  return 0;
}