#include #include #include #include #include #include #include #include #include long getgcd(long a, long b) { while (0 < a && 0 < b) { if (a < b) b = b % a; else a = a % b; } return std::max(a, b); } int main(void) { long a, b, c, d; std::cin >> a >> b; c = a + b; d = getgcd(a, c); d *= getgcd(c / d, b); std::cout << d << std::endl; return 0; }