/** Author :- Rajat Shahi It's never too late !! **/ #include using namespace std; int main() { cin.tie(0)->sync_with_stdio(0); cin.exceptions(ios::badbit | ios::failbit); long long a, b; cin >> a >> b; long long gcd = __gcd(a, b); long long ans = gcd; a /= gcd, b /= gcd; ans *= __gcd(a + b, gcd); cout << ans << endl; }