#include <bits/stdc++.h>
using namespace std;
long ucln(long a,long b)
{
    if(a<0){
        a=a*-1;
    }
    if(b<0){
        b=b*-1;
    }
   while(a!=b)
   {
       if(a>b){
        a=a-b;
       }
       else b=b-a;
   }
   return a;
}
int main()
{
    ifstream f1("CAU1_14.inp");
    ofstream f2("CAU1_14.out");
    long a,b,c,d;
    f1>>a>>b>>c>>d;
    long x=(a*d)-(b*c);
    long y=b*d;
    long D=ucln(x,y);
    x=x/D;
    y=y/D;
    f2<<x<<" "<<y;
    f1.close();
    f2.close();
    return 0;
}
