#include #include #include #include using namespace std; int main() { unsigned long long a, b; cin >> a >> b; __int128 sum = ((__int128)a) + ((__int128)b); __int128 mul = ((__int128)a) * ((__int128)b); unsigned long long gcd = (unsigned long long)__gcd(sum, mul); cout << gcd << endl; return 0; }