#include <fstream>
#include <stdlib.h>
using namespace std;
long a,b,c,d;
ifstream f1("cau1_14.inp");
ofstream f2("cau1_14.out");
int main()
{
    f1 >> a >> b >> c >> d;
    long ms = b*d;
    long ts = a*d - b*c;
    long tg1 = abs(ms),tg2 = abs(ts);
    while (tg1 != tg2)
    {
        if (tg1 > tg2) tg1 = tg1 - tg2;
        else tg2 = tg2 - tg1;
    }
    ts = ts / tg1;ms = ms/tg1;
    f2 << ts << " " << ms;
    return 0;
}
