// Validator #include #include #include "testlib.h" int main(int argc, char **argv) { registerValidation(argc, argv); int N, M, K; N = inf.readInt(3, 1000000); inf.readSpace(); M = inf.readInt(1, N - 2); inf.readSpace(); K = inf.readInt(1, N - M - 1); inf.readEoln(); inf.readEof(); long long den = 1LL * N * (N - 1 - K), num = 1LL * M * (N - 1); auto g = std::gcd(den, num); den /= g; num /= g; std::cout << num << ' ' << den << '\n'; }