func_code_string: #include <bits/stdc++.h>   int DEBUG = 1;   using namespace std;   const int N = 100 * 1000 + 5;   const long long INF = 1e17;   long long gcd(long long a, long long b) {     if (b == 0)       return a;     else       return gcd(b, a % b);   }   long long n, k;   long long a, b;   long long x;   long long MIN = +INF;   long long MAX = -INF;   long long dist(long long v, long long u) {     if (v > u) swap(v, u);     return min(u - v, x - (u - v));   }   void check(long long s2) {     long long d = dist(a, s2);     long long L = d;     long long cur = x / gcd(L, x);     MAX = max(MAX, cur);     MIN = min(MIN, cur);   }   int main() {     cin >> n >> k;     cin >> a >> b;     x = n * k;     for (long long e = 0; e < x; e += k) {       check((e - b + x) % x);       check((e + b) % x);     }     cout << MIN <<     << MAX << endl;     return 0;   }   