#include using namespace std; int main() { long long N, M, K; cin >> N >> M >> K; long long P = M * (N - 1); long long Q = N * (N = K = 1); long long div = __gcd(P, Q); cout << P / div << " " << Q / div << endl; }