#include<bits/stdc++.h>
using namespace std;
ifstream fi("CAU1_14.inp");
ofstream fo("CAU1_14.out");
int gcd(int x, int y){
    int tg;
    x=abs(x);
    y=abs(y);
    while(x!=0 && y!=0 && x!=y){
        tg=x;
        x=y%x;
        y=tg;
    }
return y;
}
int main(){
  ios::sync_with_stdio(false);
  int64_t a,b,c,d,x,y;
  fi>>a>>b>>c>>d;
  x=(a*abs(d)-c*abs(b))/gcd(b,d);
  y=abs(b*d/gcd(b,d));
  int64_t t=gcd(x,y);
  x=x/t;
  y=y/t;
  fo<<x<<' '<<y;
}
