int gcd(int a, int b) { return !b ? a : gcd(b, a % b); } pair E(int64_t a, int64_t b) { // {x, y} ax + by // |x|= m) r -= m; return r; }