#include "bits/stdc++.h" using namespace std; #define DEBUG(x) cout<<#x<<": "< #define vl vector #define vii vector< vector > #define vll vector< vector > #define vs vector #define pii pair #define pis pair #define psi pair const int inf = 1000000001; const ll INF = 1e16; #define MOD 1000000007 #define mod 1000000009 #define pi 3.14159265358979323846 #define Sp(p) cout< a) { swap(a, b); } ll r = a%b; while (r != 0) { a = b; b = r; r = a%b; } return b; } int main() { ll a, b; cin >> a >> b; ll sum = a + b; ll g = gcd(sum, a); sum /= g; ll h = gcd(sum, b); cout << g * h << endl; return 0; }