#include<bits/stdc++.h>
using namespace std;
ifstream fi("BAI1_17.inp");
ofstream fo("BAI1_17.out");
int ucln(int a,int b){
int temp;
    while (b != 0)
    {
        temp = a % b;
        a = b;
        b = temp;
    }
    return a;
}
int main(){
  int a,b,t;
  t=ucln(a,b);
  a=a/t;
  b=b/t;
  fo<<a<<' '<<b;
}
