#include "iostream" #include "climits" #include "list" #include "queue" #include "stack" #include "set" #include "functional" #include "algorithm" #include "string" #include "map" #include "iomanip" #include "random" using namespace std; const long long int MOD = 1000000007; const long double EPS = 0.00000001; long long int N, M, K, W, H, L, R; long long int LCM(long long int a, long long int b) { if (a < b)swap(a, b); while (b) { a %= b; swap(a, b); } return a; } int main() { ios::sync_with_stdio(false); cin.tie(0); cin >> N >> M; K = N + M; long long int box = LCM(N, K); K /= box; cout << LCM(K, M)*box << endl; return 0; }