#include <bits/stdc++.h>

using namespace std;

ifstream fi ("TTPS.INP");
ofstream fo ("TTPS.OUT");

int ucln(long long  a, long long b){
  int temp;
    while (b != 0)
    {
        temp = a % b;
        a = b;
        b = temp;
    }
    return a;
}

int main(){
  long long x1,y1,x2,y2;
  fi>>x1>>y1>>x2>>y2;
  long long bcnn= y1*y2/ucln(y1,y2);
  long long x=x1*bcnn/y1+x2*bcnn/y2;
  fo<<x/ucln(x,bcnn)<<'/'<<bcnn/ucln(x,bcnn)<<endl;
  long long t=x1*x2,m=y1*y2;
  fo<<t/ucln(t,m)<<'/'<<m/ucln(t,m);
}
