var   a,b,c,d,p,q: longint;

Function GCD(a,b: longint): longint;
begin
    while (a>0) and (b>0) do
      if a>b then a:=a mod b else b:=b mod a;
    GCD:=a+b
end;

begin
//  assign(input,'input.txt'); reset(input);
//  assign(output,'output.txt'); rewrite(output);

    read(a,b,c,d);
    if b*c>a*d
      then begin p:=b*c-a*d; q:=b*c end
      else begin p:=a*d-b*c; q:=a*d end;

    writeln(p div gcd(p,q),'/',q div gcd(p,q))
end.

var
    a, b, c, d              :longint;
    lcm1, lcm2              :longint;
    x                       :longint;
    a1, a2, a3, a4          :longint;
    min1, min2              :longint;
    min                     :real;
procedure gcd(a,b:longint);
begin
     if a<b then gcd(b,a) else
     if b=0 then x:=a else gcd(b,a mod b);
end;

begin
    read(a,b,c,d);
    gcd(a,b); a:=a div x; b:=b div x;
    gcd(c,d); c:=c div x; d:=d div x;
    if (a=c) and (b=d) then
    begin
        writeln(0,'/',1);
        halt;
    end;
    gcd(a,c);
    lcm1:=a*c div x;
    a1:=a; a2:=b; a3:=c; a4:=d;
    a1:=lcm1; a3:=lcm1;
    a2:=b*lcm1 div a;
    a4:=d*lcm1 div c;
    min:=maxlongint;
    if a2>a4 then
    begin
        min1:=a2-a4; min2:=a2;
        min:=min1/min2;
    end;
    gcd(b,d);
    lcm2:=b*d div x;
    a2:=lcm2; a4:=lcm2;
    a1:=a*lcm2 div b;
    a3:=c*lcm2 div d;
    if a1>a3 then
    begin
        if (a1-a3)/a1<min then
        begin
            min1:=a1-a3;
            min2:=a1;
        end;
    end;
    gcd(min1,min2);
    min1:=min1 div x;
    min2:=min2 div x;
    writeln(min1,'/',min2);
end.

var a,b,c,d,temp,p,q,i,pp:longint;
begin
 readln(a,b,c,d);
 if a*d>b*c then
  begin
   temp:=a;a:=b;b:=temp;
   temp:=c;c:=d;d:=temp;
  end;
 p:=a*d;
 q:=b*c;
 p:=q-p;
 pp:=p;
 for i:=pp downto 2 do
  if (p mod i=0)and(q mod i=0) then
   begin
    p:=p div i;
    q:=q div i;
   end;
 if p=0 then q:=1;
 writeln(p,'/',q);
end.

{$MODE OBJFPC}
const
    saiso=0.000001;
var
    a,b,c,d,tu,mau,tg:int64;
    a1,b1,t,m,t1:extended;
    dem,i,j:integer;
    nc:array[1..1000000]of int64;

function gcd(a,b:int64):int64;
var
    r:int64;
begin
    while (b<>0) do
        begin
            r:=a mod b;
            a:=b;b:=r;
        end;
    exit(a);
end;

begin
    //assign(input,'196B.INP');reset(input);
    readln(a,b,c,d);
    b1:=c/a*b;a1:=d/b*a;
    if b1>=d then
        begin
            m:=b1;
            t:=b1-d;
        end else
            begin
                m:=a1;
                t:=a1-c;
            end;
    if t=0 then
        begin
            writeln(0,'/',1);
            halt;
        end;
    t:=t/m;dem:=0;
    t1:=t;
    while (abs(round(t)-t)>saiso) do
        begin
            inc(dem);nc[dem]:=trunc(t);
            t:=t-nc[dem];
            t:=1/t;
        end;
    tu:=1;mau:=round(t);
    for i:=dem downto 1 do
        begin
            tu:=tu+mau*nc[i];
            tg:=tu;tu:=mau;mau:=tg;
        end;
    tg:=gcd(tu,mau);
    if (mau/tu-t1)<=saiso then
        writeln(mau div tg,'/',tu div tg) else
            writeln(tu div tg,'/',mau div tg);
end.

//uses math;
var
  p,a,b,n,m,k,t, l,j,e,i2,j2, x,x1,x2,x3,xx,y,y1,y2,y3,yy,z,z1,z2,z3,zz,w,r,c :int64;
  d:array[0..1000001]of longint;
  s:array[0..1001,0..1001]of longint;
  ans,res,max,min,sum,best:int64;
  h:boolean;
  flag:array[0..1001,0..1001]of boolean;
  i:longint;

begin ans:=0;res:=0;max:=0;min:=0;sum:=0;best:=0;//assign(input,'input.txt');reset(input); assign(output,'output.txt');reset(output);
  readln(a,b,x,y);
  while (a<x) or (b<y) do
    begin a:=a*2; b:=b*2; end;
  if ( abs(1-a/b) > abs(1-x/y) ) then inc(t);
  if y>x then inc(t);
  if t=1 then begin
    w:=a; a:=b; b:=w;
    w:=y; y:=x; x:=w;
  end;
  p:=y*a;
  b:=b*x;
  for i:=10000 downto 1 do
    if (p mod i=0) and (b mod i=0) then begin
      p:=p div i;
      b:=b div i;
    end;
  writeln(b-p,'/',b);
  readln; readln; //close(input); close(output);
end.

Var a,b,c,d,z:longint;
function nod(a,b:longint):longint;
begin
  if b>a
  then nod:=nod(b,a)
  else if b=0
       then nod:=a
       else nod:=nod(b, a mod b);
end;
begin
 // Assign(input,'input.txt'); reset(input);
 // Assign(output,'output.txt'); rewrite(output);
  read(a,b,c,d);
  z:=nod(a,b);
  a:=a div z;
  b:=b div z;
  z:=nod(c,d);
  c:=c div z;
  d:=d div z;
  if (a=c)and(b=d)
  then begin
        writeln(0,'/',1);
        halt(0);
       end;
  if a*d<b*c
  then begin
        a:=(b*c-a*d);
        b:=b*c;
        z:=nod(a,b);
        a:=a div z;
        b:=b div z;
        writeln(a,'/',b);
       end
  else begin
        c:=(a*d-b*c);
        d:=a*d;
        z:=nod(c,d);
        c:=c div z;
        d:=d div z;
        writeln(c,'/',d);
       end;
end.

const   fi='';
        fo='';
var     f,g:text;
        a,b,c,d,tu,mau,h,t,a2,c2,m:integer;
        function gcd(a,b:integer):integer;
        var     t:integer;
                begin
                        if a=0 then exit(b);
                        t:=a;
                        a:=b mod a;
                        b:=t;
                        exit(gcd(a,b));
                end;
begin
        assign(f,fi);
        reset(f);
        assign(g,fo);
        rewrite(g);
        readln(f,a,b,c,d);
        close(f);

        t:=gcd(a,c);
        m:=gcd(b,d);
        tu:=a*c div t;
        mau:=b*d div m;
        a2:=a*mau div b;
        c2:=c*mau div d;
        if a2>c2 then
        begin
                h:=a2-c2;
                t:=gcd(h,a2);
                h:=h div t;
                a2:=a2 div t;
                writeln(g,h,'/',a2);
        end
        else
        begin
                b:=b*tu div a;
                d:=d*tu div c;
                h:=b-d;
                t:=gcd(h,b);
                h:=h div t;
                b:=b div t;
                writeln(g,h,'/',b);
        end;
        close(g);
end.

uses math;

Var a,b,c,d,t1,t2,s:int64;

procedure tt(a,b:longint);
 begin
   while (a>0) and (b>0) do
    begin
      if a>b then a:=a mod b
      else b:=b mod a;
    end;
    s:=a+b;
 end;

   begin
     read(a,b,c,d);
     if (a>=c) and (b>=d) then begin
     t1:=b*c;
     t2:=d*a;
     tt(t1,t2);
     t1:=t1 div s;
     t2:=t2 div s;
     writeln(abs(t2-t1),'/',max(t1,t2));
     end
     else begin
            t1:=b*c;
            t2:=d*a;

            tt(t1,t2);
            t1:=t1 div s;
            t2:=t2 div s;
            writeln(abs(t1-t2),'/',max(t1,t2));
          end;
   end.

{$MODE OBJFPC}
program onlylove;
uses math;
var a,b,c,d ,ans1,m,n,x,ans2: integer;
function gcd(x,y : integer) : integer;
   begin
      if y=0 then exit(x);
      exit(gcd(y,x mod y));
   end;
function lcm(x,y : integer) :integer;
  begin
    exit(x*y*gcd(x,y));
  end;
procedure th1;
  begin
   x := lcm(a,c);
   m:=x div a;
   n:=x div c;
   a:=x;
   c:=x;
   b:=b*m;
   d:=d*n;
   ans1:=abs(b-d);
   ans1:=ans1 div gcd(b,d);
   Writeln(ans1,'/',b div gcd(b,d) );
  end;
procedure th2;
  begin
   x := lcm(b,d);
   m:=x div b;
   n:=x div d;
   b:=x;
   d:=x;
   a:=a*m;
   c:=c*n;
   ans1:=abs(a-c);
   ans1:=ans1 div gcd(a,c);
   Writeln(ans1,'/',a div gcd(a,c) );
  end;
begin
  readln(a,b,c,d);
  if (a/b < c/d) then th1 else th2;

end.

var n,m,k,l,i,j,t,s : longint;
   function nod(i,j : longint) : longint;
     begin
      if (i <> 0) then nod := nod (j mod i,i) else nod := j;
     end;
 function nok(i,j : longint): longint;
  begin
   nok := (i div nod(i,j)) * j;
  end;
begin
 readln(n,m,k,l);
  t := n;
  s := k;
  n := nok(n,k);
  k := nok(t,k);
  m := m * n div t;
  l := l * k div s;
  while nod(m,l) > 1 do
   begin
    t := m;
    m := m div nod(m,l);
    l := l div nod(t,l);
   end;
  if (m < l) then
   write(l - m,'/',l)
  else
   write(m - l,'/',m);
end.

uses math;
var
  a,b,c,d,temp:longint;
  r:extended;

function gcd(x,y:longint):longint;
begin
  while (x<>0) and (y<>0) do
    if x>y then x:=x mod y else y:=y mod x;
  exit(x+y);
end;

begin
  read(a,b,c,d);
  if b=d then
    begin
      temp:=a;a:=b;b:=temp;
      temp:=c;c:=d;d:=temp;
    end;
  if a=c then
    begin
      if b=d then writeln('0/1');
      temp:=gcd(b-d,b);
      if b>d then
          writeln( (b-d) div temp,'/',b div temp);
      if d>b then
        begin
          temp:=gcd(d-b,d);
          writeln( (d-b) div temp,'/',d div temp);
        end;
      halt;
    end;
      r:=d*(a/c);
      if r<=b then
        begin
          temp:=gcd(c*b-d*a,c*b);
          writeln( (c*b-d*a) div temp,'/', (c*b) div temp);
        end;
      if r>b then
        begin
          temp:=gcd(a*d-c*b,a*d);
          writeln( (a*d-c*b) div temp,'/',(a*d) div temp);
        end;
END.

var
     A,B,C,D,X,Y,Z:Longint;
function Nod(AA,BB:Longint):Longint;
begin
     while (AA<>0) and (BB<>0) do
     if AA>BB then AA:=AA mod BB
              else BB:=BB mod AA;
     Nod:=AA+BB;
 end;
begin
     Readln(A,B,C,D);
     X:=C*B;
     Y:=D*A;
     Z:=Nod(X,Y);
     X:=X div Z;
     Y:=Y div Z;
     if X-Y>0 then Writeln(X-Y,'/',X)
              else Writeln(Y-X,'/',Y);
 end.

var a,b,c,d,ch1,ch2,k:longint;
function nsd(x,y:longint):longint;
begin
 if x>0 then nsd:=nsd(y mod x,x) else nsd:=y;
end;
begin
 read(a,b,c,d);
 ch1:=a*d;
 ch2:=b*c;
 if ch1>ch2 then
  begin
   k:=nsd(ch1-ch2,ch1);
   writeln((ch1-ch2) div k,'/',ch1 div k);
   end else
   begin
    k:=nsd(ch2-ch1,ch2);
    writeln((ch2-ch1) div k,'/',ch2 div k);
   end;
  end.

var a,b,c,d,i,j,k,l,m,n:longint;

function gcd(a,b:longint):longint;
begin
  if b=0 then exit(a);
  exit(gcd(b,a mod b));
end;

procedure doit1;
begin
  k:=gcd(a*d-b*c,a*d);
  writeln((a*d-b*c)div k,'/',(a*d) div k);
end;

procedure doit2;
begin
  k:=gcd(b*c-a*d,b*c);
  writeln((b*c-a*d)div k,'/',(b*c) div k);
end;

begin
  readln(a,b,c,d);
  if a/b>=c/d then doit1 else doit2;
end.

var
s,g,ss,a,b,c,d:longint;
function max(a,b:longint):longint;
begin
 if a>b then max:=a
 else max:=b;
end;
function gcd(a,b:longint):longint;
begin
 if a mod b=0 then gcd:=b
 else gcd:=gcd(b,a mod b);
end;
begin
 read(a,b,c,d);
 if a/b>c/d then
  begin
    g:=gcd(max(b,d),b+d-max(b,d));
    s:=b*d div g;
    ss:=s div b*a-s div d*c;
    writeln(ss div gcd(s div b*a,ss),'/',s div b*a div gcd(s div b*a,ss));
  end;
 if a/b<c/d then
  begin
    g:=gcd(max(a,c),a+c-max(a,c));
    s:=a*c div g;
    ss:=s div a*b-s div c*d;
    writeln(ss div gcd(s div a*b,ss),'/',s div a*b div gcd(s div a*b,ss));
  end;
 if a/b=c/d then writeln('0/1');
end.

function gcd(a,b:longint):longint;
var tmp,c:longint;
begin
	if b>a then begin
		tmp:=a;
		a:=b;
		b:=tmp;
	end;
	repeat
		c:=a mod b;
		a:=b;
		b:=c;
	until(c=0);
	exit(a);
end;

var a,b,c,d,p,q,tmp:longint;
begin
	read(a,b,c,d);
	if a*d>c*b then begin
		p:=a*d-b*c;
		q:=a*d;
	end
	else begin
		p:=b*c-a*d;
		q:=b*c;
	end;
	if p<>0 then begin
		tmp:=gcd(p,q);
		p:=p div tmp;
		q:=q div tmp;
	end
	else q:=1;
	write(p,'/',q);
end.

Uses math;
Type
        mat=array [1..1000000] of longint;
Var     a,b,c,d,a1,b1,c1,d1:longint;
        res,kq:longint;
        fi,fo:text;

Procedure Doc;
        Var i:longint;
        Begin
                Read(fi,a,b,c,d);
                a1:=a;b1:=b;c1:=c;d1:=d;
        end;

Function Ucln(x,y:longint):longint;
        Begin
                If x=0 then exit(y);
                If y=0 then exit(x);
                If x<y then exit(Ucln(x,y mod x));
                exit(Ucln(x mod y,y));
        end;

Function Bcnn(x,y:longint):longint;
        Begin
                exit(x*y div Ucln(x,y));
        end;

Procedure Lam;
        Var u:longint;
            ok:boolean;
        Begin
                ok:=false;
                u:=Bcnn(a,c);
                b:=b*(u div a);
                d:=d*(u div c);
                a:=u;
                c:=u;
                If b>=d then
                 Begin
                        If b=d then Write(fo,0,'/',1)
                        else
                         Begin
                                kq:=b;
                                res:=b-d;
                                u:=Ucln(kq,res);
                                Write(fo,res div u,'/',kq div u);
                         end;
                        ok:=true;
                 end;
                If ok then exit;
                a:=a1;
                b:=b1;
                c:=c1;
                d:=d1;
                u:=Bcnn(b,d);
                a:=a*(u div b);
                c:=c*(u div d);
                b:=u;
                d:=u;
                If a>=c then
                 Begin
                        If a=c then Write(fo,0,'/',1)
                        else
                         Begin
                                kq:=a;
                                res:=a-c;
                                u:=Ucln(kq,res);
                                Write(fo,res div u,'/',kq div u);
                         end;
                        ok:=true;
                 end;

        end;

Procedure Inkq;
        Begin
        end;

        Begin
                Assign(fi,'');Reset(fi);
                Assign(fo,'');Rewrite(fo);
                        Doc;
                        Lam;
                        Inkq;
                Close(fo);Close(fi);
        end.

var a,b,c,d,t,x,y,son,m:longint;
begin
  readln(a,b,c,d);
  if a*d>b*c then
  begin
    son:=a*d-b*c; m:=a*d;
    x:=son; y:=m;
    if x<y then begin t:=x; x:=y; y:=t; end;
    while x mod y<>0 do
    begin
      t:=x mod y;
      x:=y;
      y:=t;
    end;
    writeln(son div y,'/',m div y);
  end
  else
  if a*d<b*c then
  begin
    son:=c*b-a*d; m:=c*b;
    x:=son; y:=m;
    if x<y then begin t:=x; x:=y; y:=t; end;
    while x mod y<>0 do
    begin
      t:=x mod y;
      x:=y;
      y:=t;
    end;
    writeln(son div y,'/',m div y);
  end
  else writeln(0,'/',1);
end.

var a, b, c, d, p, q, x, y, z: int64;
begin
        readln(a, b, c, d);

        p := abs(b * c - a * d);
        if a / b < c / d then
                q := b * c
        else
                q := a * d;
        x := p;
        y := q;
        while y > 0 do
        begin
                z := x;
                x := y;
                y := z mod x;
        end;
        writeln(p div x, '/', q div x);
end.

var a,b,c,d,i,ans1,ans2,u:longint;q1,q2:real;
function gcd(n,m:longint) : longint;
var r : longint;
begin
  while m <> 0 do
    begin
      r := n mod m;
      n := m;
      m := r;
    end;
  gcd := n;
end;

Begin
 readln(a,b,c,d);
 q1:=a/c;
 q2:=b/d;
 if q1<q2 then
  begin
      ans1:=b*c-a*d;
      ans2:=b*c;
  end
 else begin
         ans1:=a*d-b*c;
         ans2:=a*d;
      end;
 u := gcd(ans1,ans2);
 ans1:=ans1 div u;
 ans2:=ans2 div u;
 writeln(ans1,'/',ans2);
End.

var a,b,c,d,i,ans1,ans2:longint;q1,q2:real;
Begin
 readln(a,b,c,d);q1:=a/c;q2:=b/d;
 if q1<q2 then begin ans1:=b*c-a*d;ans2:=b*c; end else begin ans1:=a*d-b*c;ans2:=a*d;end;
 for i:=100000 downto 1 do
  if (ans1 mod i=0)and(ans2 mod i=0) then begin ans1:=ans1 div i;ans2:=ans2 div i; end;
 writeln(ans1,'/',ans2);
End.

var
  a,b,c,d,k,temp,aa,x,y:longint;
function gcd(a,b:longint):longint;
begin
  if a mod b=0 then gcd:=b
               else gcd:=gcd(b,a mod b);
end;
function lcm(a,b:longint):longint;
begin
  lcm:=a*b div gcd(a,b);
end;
begin
  readln(a,b,c,d);
  k:=lcm(a,c);
  if d*(k div c)>b*(k div a) then
    begin
      k:=lcm(b,d);
      y:=a*(k div b);
      x:=y-c*(k div d);
    end
  else
    begin
      y:=b*(k div a);
      x:=y-d*(k div c);
    end;
  if x=0 then
    begin
      writeln('0/1');
      close(input);
      close(output);
      halt;
    end;
  k:=gcd(x,y);
  x:=x div k;
  y:=y div k;
  writeln(x,'/',y);
end.

CONST
   fi='';
   fo='';
var a,b,c,d:longint;
PROCEDURE INIT;
BEGIN
 assign(input,fi); reset(input);
 assign(output,fo);rewrite(output);
END;
FUNCTION gcd(x,y:longint):longint;
BEGIN
 if y=0 then exit(x);
 exit(gcd(y,x mod y));
END;
PROCEDURE doit;
var i,j,x,y,z:longint;
   BEGIN
     readln(a,b,c,d);
     a:=a*d;
     b:=b*c;
     if a > b then begin x:=a;a:=b;b:=x;end;
     a:=b-a;
     writeln(a/gcd(a,b):1:0,'/',b/gcd(a,b):1:0);
   END;
PROCEDURE closef;
BEGIN
      close(input);
      close(output);
   END;
BEGIN
   init;
   doit;
   closef;
END.

uses math;

Var a,b,c,d,t1,t2,s:int64;

procedure tt(a,b:longint);
 begin
   while (a>0) and (b>0) do
    begin
      if a>b then a:=a mod b
      else b:=b mod a;
    end;
    s:=a+b;
 end;

   begin
     read(a,b,c,d);
     if (a>=c) and (b>=d) then begin
     t1:=b*c;
     t2:=d*a;
     tt(t1,t2);
     t1:=t1 div s;
     t2:=t2 div s;
     writeln(abs(t2-t1),'/',max(t1,t2));
     end
     else begin
            t1:=b*c;
            t2:=d*a;

            tt(t1,t2);
            t1:=t1 div s;
            t2:=t2 div s;
            writeln(abs(t1-t2),'/',max(t1,t2));
          end;
   end.

var
  a, b, c, d,xm,ans1,ans2: longint;
  dx, dy: longint;
  tempk1, tempk2:real;
function nod(x,y:longint):longint;
begin
   if y=0 then
      nod:=x
   else
      nod:=nod(y,(x mod y))
end;
begin
  readln(a, b, c, d);
  if (a / b = 1) then begin

    if (c > d) then begin
      dx := c - d;
      dy := c;

    end
    else
    begin
      dx := d - c;
      dy := d;

    end;

  end
  else
  if (c / d = 1) then begin

    if (a > b) then begin
      dx := a - b;
      dy := a;

    end
    else
    begin
      dx := b - a;
      dy := b;

    end;

  end
  else
  //if (c>=a) or (d>=b) then
  begin
    tempk1 := c / a;
    tempk2 := d / b;
    if (tempk1 > tempk2) then
    begin
      dy := b * c - d * a;
      dx := c * b;

    end
    else
    begin
      dx := a * d - c * b;
      dy := d * a;

    end;
  end;
  ans1:=dx div nod(dx,dy);
  ans2:=dy div nod(dx,dy);
  if ans1<ans2 then
  writeln(ans1,'/',ans2)
  else
  writeln(ans2,'/',ans1);

end.

var a,b,c,d,p,q:longint;
procedure swap(var a,b:longint);
var t:longint;
begin
  t:=a;a:=b;b:=t;
end;
function gcd(a,b:longint):longint;
begin
  if b=0 then exit(a);
  exit(gcd(b,a mod b));
end;
begin
  readln(a,b,c,d);
  if a*d>c*b then
  begin
    swap(a,b);
    swap(c,d);
  end;
  p:=b*c-a*d;
  q:=b*c;
  writeln(p div gcd(p,q),'/',q div gcd(p,q));
end.

var a,b,c,d,p,q,t:longint;
function gcd(a,b:longint):longint;
var c:longint;
begin
  while b<>0 do
  begin
    c:=a;
    a:=b;
    b:=c mod b;
  end;
  exit(a);
end;
begin
  readln(a,b,c,d);
  if a*d>c*b then
  begin
    t:=a;a:=b;b:=t;
    t:=c;c:=d;d:=t;
  end;
  p:=b*c-a*d;
  q:=b*c;
  writeln(p div gcd(p,q),'/',q div gcd(p,q));
end.

var a,b,c,d,p,q,t:longint;
function gcd(a,b:longint):longint;
var c:longint;
begin
  while b<>0 do
  begin
    c:=a;
    a:=b;
    b:=c mod b;
  end;
  exit(a);
end;
begin
  readln(a,b,c,d);
  if a*d>c*b then
  begin
    t:=a;a:=b;b:=t;
    t:=c;c:=d;d:=t;
  end;
  p:=b*c-a*d;
  q:=b*c;
  writeln(p div gcd(p,q),'/',q div gcd(p,q));
end.
//chen_zhe AK IOI!!!
//chen_zhe AK IOI!!!
//chen_zhe AK IOI!!!
//chen_zhe AK IOI!!!
//chen_zhe AK IOI!!!
//chen_zhe AK IOI!!!
//chen_zhe AK IOI!!!
//chen_zhe AK IOI!!!
//chen_zhe AK IOI!!!
//chen_zhe AK IOI!!!
//chen_zhe AK IOI!!!
//chen_zhe AK IOI!!!
//chen_zhe AK IOI!!!
//chen_zhe AK IOI!!!
//chen_zhe AK IOI!!!
//chen_zhe AK IOI!!!
//chen_zhe AK IOI!!!
//chen_zhe AK IOI!!!
//chen_zhe AK IOI!!!
//chen_zhe AK IOI!!!
//chen_zhe AK IOI!!!

var a,b,c,d,p,q,t:longint;
function gcd(a,b:longint):longint;
begin
  if b=0 then exit(a);
  exit(gcd(b,a mod b));
end;
begin
  readln(a,b,c,d);
  if a*d>c*b then
  begin
    t:=a;a:=b;b:=t;
    t:=c;c:=d;d:=t;
  end;
  p:=b*c-a*d;
  q:=b*c;
  writeln(p div gcd(p,q),'/',q div gcd(p,q));
end.

var i,j,k,n,m,p,q,a,b,c,d:longint;

   function gcd(a,b:longint):longint;
   begin
     if a mod b=0 then exit(b);
     exit(gcd(b,a mod b));
   end;

begin
  readln(a,b,c,d);
  if b*c>a*d then
  begin
    p:=c*b-a*d;
    q:=b*c;
  end
  else
  begin
    p:=a*d-c*b;
    q:=a*d;
  end;
  if (p=0) or (q=0) then writeln('0/1')
  else
  begin
    k:=gcd(q,p);
    p:=p div k;
    q:=q div k;
    writeln(p,'/',q);
  end;
end.

var
x,y,a,b,c,d:longint;
Function gcd(m,n:longint):longint;
begin
if (m mod n=0) or( n mod m=0) then
  begin
  if m mod n=0 then gcd:=n;
  if n mod m=0 then gcd:=m;
  end else
  begin
  if m>n then gcd:=gcd(m mod n, n);
  if n>m then gcd:=gcd(n mod m, m);
  end;
end;
begin
read(a,b,c,d);
if a*d>b*c then
begin
x:=b*c; y:=a*d;
c:=gcd(x,y);
x:=x div c;
y:=y div c;
end;
if b*c>a*d then
begin
x:=a*d; y:=b*c;
c:=gcd(x,y);
x:=x div c;
y:=y div c;
end;
if b*c=a*d then begin x:=1; y:=1; end;
Writeln(y-x,'/',y);
end.

var a,b,c,d,i,x,y:longint;
begin
  readln(a,b,c,d);
  if a/c<b/d then
    begin
      x:=b*c-a*d;
      y:=b*c;
    end
  else
    begin
      x:=a*d-b*c;
      y:=a*d;
    end;
  for i:=100000downto 1do
    if(x mod i=0)and(y mod i=0)then
      begin
        x:=x div i;
        y:=y div i;
      end;
  write(x,'/',y);
end.

uses math;
var a,b,c,d,g:integer;

function gcd(x,y:longint):longint;

begin
if y=0 then
begin
gcd:=x;
exit;
end;

gcd:=gcd(y,x mod y);
end;

begin
read(a,b,c,d);
if a*d=b*c then
begin
write('0/1') ;
halt;
end;

if a*d<b*c then
begin
g:=a*c div gcd(max(a,c),min(a,c));
b:=b*g div a;
d:=d*g div c;
a:=g;
c:=g;
g:=gcd(b,b-d);
write((b-d) div g,'/',b div g);
halt;
end
else
begin
g:=b*d div gcd(max(b,d),min(b,d));
a:=a*g div b;
c:=c*g div d;
b:=g;
d:=g;
g:=gcd(a,a-c);
write((a-c) div g,'/',a div g);
end;
end.

uses math;
  var  a , b , c , d , del , acc , bcc : longint;

function gsd(p , q : longint) : longint; begin
  if p = 0 then exit(q)
    else exit(gsd(q mod p , p));
end;

BEGIN

  readln(a , b , c , d);
  del := gsd(a , b); a := a div del; b := b div del;
  del := gsd(c , d); c := c div del; d := d div del;
  a := a * c * d; b := b * c * d;
  del := min(a div c , b div d);
  acc := a - c * del; bcc := b - d * del;
  if (acc = 0) and (bcc = 0) then begin writeln(0 , '/' , 1); halt; end;
  if acc = 0 then writeln(bcc div gsd(b , bcc) , '/' , b div gsd(b , bcc));
  if bcc = 0 then writeln(acc div gsd(a , acc) , '/' , a div gsd(a , acc));

END.

var
     A,B,C,D,X,Y,Z:Longint;
function Nod(AA,BB:Longint):Longint;
begin
     while (AA<>0) and (BB<>0) do
     if AA>BB then AA:=AA mod BB
              else BB:=BB mod AA;
     Nod:=AA+BB;
 end;
begin
     Readln(A,B,C,D);
     X:=C*B;
     Y:=D*A;
     Z:=Nod(X,Y);
     X:=X div Z;
     Y:=Y div Z;
     if X-Y>0 then Writeln(X-Y,'/',X)
              else Writeln(Y-X,'/',Y);
 end.

var a,p,q:dword; b,c,d:word;
function ucln(x,y:dword):dword;
var z:dword;
begin
        while y>0 do
        begin
                x:=x mod y; z:=x; x:=y; y:=z
        end;
        ucln:=x
end;
begin
        read(a,b,c,d);
        if a/b<c/d then
        begin
                q:=b*c; p:=q-a*d
        end
        else begin
                q:=a*d; p:=q-b*c
        end;
        a:=ucln(p,q); p:=p div a; q:=q div a;
        write(p,'/',q)
end.

var
  a,b,c,d,x,y:longint;

function gcd(x,y:longint):longint;
var res:longint;
begin
  if (y=0) then res:=x else res:=gcd(y,x mod y);
  exit(res);
end;

begin
  readln(a,b,c,d);
  if (a/b=c/d) then writeln('0/1') else
  begin
    if (a/b>c/d) then
    begin
      x:=a*d-b*c; y:=a*d;
      writeln(x div gcd(x,y),'/',y div gcd(x,y));
    end
      else
    begin
      x:=b*c-a*d; y:=b*c;
      writeln(x div gcd(x,y),'/',y div gcd(x,y));
    end;
  end;
end.

program p196b;
  var a,b,c,d,x,y:longint;

function cmmdc(a,b:longint):longint;
  begin
    if a=0 then cmmdc:=b else
      if b=0 then cmmdc:=a else
        if a>b then cmmdc:=cmmdc(b,a mod b) else
                    cmmdc:=cmmdc(a,b mod a);
  end;

begin
  readln(a,b,c,d);
  if c/a=d/b then writeln('0/1') else
  begin
  if c/a>d/b then
    begin
      x:=a*d;
      y:=c*b;
    end else
    begin
      x:=b*c;
      y:=d*a;
    end;
  x:=y-x;
  a:=cmmdc(x,y);
  writeln(x div a,'/',y div a);
  end;
end.

//writen by zscnash
Program cf196bb;

Var

  dqa,dqb,dqc,dqd,a,b,c,d,gcdab,gcdcd,aa,bb,bl,exb,exd,exa,exc,gcdac,gcdbd,dq,ansx,ansy:Int64;

  ans:Extended;

Function Gcd(a,b:Int64):Int64;

Begin

  If (a Mod b=0) Then Exit(b) Else

    Exit(Gcd(b,a mod b));

End;

Begin

  ans:=19950920;

  Read(a,b);

  Readln(c,d);

  gcdab:=Gcd(a,b);

  gcdcd:=Gcd(c,d);

  a:=a Div gcdab;b:=b Div gcdab;

  c:=c Div gcdcd;d:=d Div gcdcd;

  aa:=a;bb:=b;

  gcdac:=Gcd(a,c);

  bl:=a*c Div gcdac Div a;

  exb:=b*bl;

  bl:=a*c Div gcdac Div c;

  exd:=d*bl;

  If exb>=exd Then Begin

    dq:=exb-exd;

    dqa:=a *c Div gcdac;

    IF dq/exb<ans Then Begin

      ans:=dq/exb;

      ansx:=dq;ansy:=exb;

    End;

  End;

  gcdbd:=Gcd(b,d);

  bl:=b*d Div gcdbd Div b;

  exa:=a*bl;

  bl:=b*d Div gcdbd Div d;

  exc:=c*bl;

  IF exa>=exc Then Begin

    dq:=exa-exc;

    dqb:=b*d Div gcdbd;

    IF dq/exa<ans Then Begin

      ans:=dq/exa;

      ansx:=dq;ansy:=exa;

    End;

  End;

  dq:=Gcd(ansx,ansy);

  IF ans=0 Then Begin

    ansx:=0;ansy:=1;

  End Else Begin

    ansx:=ansx Div dq;ansy:=ansy Div dq;

  End;

  Writeln(ansx,'/',ansy);

End.

var
  a,b,c,d,x,y : longint;

procedure swap(var a,b : longint);
var
  t : longint;
begin
  t := a;
  a := b;
  b := t;
end;

function gcd(a,b : longint) : longint;
begin
  if (b = 0) then
    exit(a);
  exit(gcd(b,a mod b));
end;

procedure main;
var
  t,lsy : longint;
begin
  readln(a,b,c,d);
  if (a/b = c/d) then
  begin
    writeln('0/1');
    exit;
  end;
  if (a/b > c/d) then
  begin
    t := gcd(b,d);
    lsy := b*d div t;
    a := a * (lsy div b);
    c := c * (lsy div d);
    b := lsy;
    d := lsy;
    x := abs(a-c);
    y := a;
    if (x > y) then
      swap(x,y);
    t := gcd(x,y);
    x := x div t;
    y := y div t;
    writeln(x,'/',y);
  end;
  if (a/b < c/d) then
  begin
    t := gcd(a,c);
    lsy := a*c div t;
    b := b * (lsy div a);
    d := d * (lsy div c);
    a := lsy;
    c := lsy;
    x := abs(b-d);
    y := b;
    if (x > y) then
      swap(x,y);
    t := gcd(x,y);
    x := x div t;
    y := y div t;
    writeln(x,'/',y);
  end;
end;

begin
  main;
end.

program zaD_1;
 var i,j,kol,n,m,a,b,c,d,k,t,x,min,nod:longint;
 s:int64;
 //a:array[0..1000000]of longint;
 function gcd(m,n:longint):longint;
  var modulo:longint;
   begin
        modulo:=m mod n;
         if modulo = 0 then
          gcd:=n
          else
          gcd:=gcd(n,modulo);
   end;

BEGIN
    { assign(input,'input.txt');
     assign(output,'output.txt');
     reset(input);
     rewrite(output);}
     readln(a,b,c,d);
     nod:=gcd(a,b);
     a:=a div nod;
     b:=b div nod;

     nod:=gcd(c,d) ;
     c:=c div nod;
     d:=d div nod;

     //kof:=c/d;

     if ((a*d)/c)<=b then
      begin
           k:=b*c;
           k:=k-(a*d);
           nod:=gcd(k,c*b);
           writeln(k div nod,'/',(c*b) div nod);
      end
     else
      begin
           k:=a*d;
           k:=k-(b*c);
           nod:=gcd(k,d*a);
           writeln(k div nod,'/', d*a div nod);
      end;

END.

Var a,b,c,d,pos,fm,pos1,fm1:longint;

Function Gcd(x,y:longint):longint;
   begin
    if y=0 then exit(x)
	 else exit(Gcd(y,x mod y));
   end;

Begin
 read(a,b,c,d);
 {if a<b then Swap(a,b);
 if c<d then Swap(c,d);}
 if d*a<=b*c then
  begin
   pos:=b*c-a*d; fm:=c*b;
   pos1:=pos; fm1:=fm;
   pos:=pos div Gcd(pos1,fm1);
   fm:=fm div Gcd(pos1,fm1);
  end
 else
  begin
   pos:=a*d-c*b; fm:=a*d;
   pos1:=pos; fm1:=fm;
   pos:=pos div Gcd(pos1,fm1);
   fm:=fm div Gcd(pos1,fm1);
  end;
 writeln(pos,'/',fm);
End.

uses math;
var
   i,n:longint;
   pp:array[1..2] of int64;
   a,b,p,q,aa,bb,m:int64;
function mcd(a,b:int64):int64;
var
   t:int64;
begin
   while a mod b<>0 do
   begin
      t:=a mod b;
      a:=b;
      b:=t;
   end;
   mcd:=b;
end;
begin
   readln(a,b,p,q);
   if  (p*b<=q*a) then
   begin
       pp[1]:=q*a-p*b;
       pp[2]:=q*a;
   end
   else
   begin
     pp[1]:=p*b-q*a;
     pp[2]:=p*b;
   end;
   m:=mcd(pp[1],pp[2]);
   for i:=1 to 2 do
      pp[i]:=pp[i] div m;
   writeln(pp[1],'/',pp[2]);
end.

program bb;
var
        a , b , c , d , bc , ta , tb , tc , td , t1 ,t2 , du : int64;
        kq1 : double;
function ucln ( x , y : int64 ) : int64;
var
        r : int64;
begin
        if x = 0 then exit ( x );
        while y <> 0 do
                begin
                        r := x mod y;
                        x := y;
                        y := r;
                end;
        exit ( x );
end;
begin
        readln ( a , b , c , d );
        du := ucln ( a ,b );
        a := a div du;
        b := b div du;
        du := ucln ( c , d );
        c := c div du;
        d := d div du;
        bc := a * c div ucln ( a , c );
        ta := bc; tb := b * bc div a;
        tc := bc; td := d * bc div c;
        kq1 := maxlongint;
        if td < tb then
                begin
                        du := tb - td ;
                        kq1 := du / tb;
                        bc := ucln ( du , tb );
                        if bc = 0 then
                                begin
                                        t1 := 0; t2 := 1;
                                end
                        else
                                begin
                                        t1 :=du div bc ;
                                        t2 := tb div bc;
                                end;

                end;
        bc := b * d div ucln ( b , d );
        ta := a * bc div b; tb := bc;
        tc := c * bc div d; td := bc;
        if tc < ta then
                begin
                         du := ta - tc;
                        if kq1 > du / ta then
                                begin
                                        bc := ucln ( du , ta );
                                        if bc = 0 then
                                                begin
                                                        t1 := 0; t2 := 1;
                                                end
                                    else
                                                begin
                                                        t1 := du div bc;
                                                        t2 := ta div bc;
                                                end;
                                end;
                end;
        if t2 = 0 then t2 := 1;
        writeln ( t1 , '/' , t2 );
end.

var
	a,b,c,m,n,k,x,y,z:longint;
	aa,bb,mm,nn:longint;

procedure gcd(n1,n2:longint);
begin
	if n1 mod n2 = 0
	then z:=n2
	else gcd(n2,n1 mod n2);
end;

begin
	read(a,b,m,n);
	if a * n > m * b
	then
	begin
		nn:=a*n - m * b;
		mm:=a*n;
	end
	else
	begin
		nn:=m*b - a*n;
		mm:=b*m;
	end;
	if mm * nn <> 0 then
	begin
		gcd(mm,nn);
		mm:=mm div z;
		nn:=nn div z;
		writeln(nn,'/',mm);
	end
	else writeln('0/1');
end.

                               {$APPTYPE CONSOLE}
const  besk=2000000000000000000;
 label 1,2,3,4;
var shag,p,k,nn,n,i10,i100,n1,dl,ii,jj,i3,i2,i1,j1,k1,kt,ppp,mask,i0,j0,step,i,j,start,finish:longint;
a1,a2,b1,b2,kol,t,cc,m1,pl,sum,p1,p2,m,k2,r,ot,aa,bb,x1,y1,x0,y0,ll,rr,d1,d2,kolvyk,xx2,q,t1,t2,modul,pp,tt,ot1,ot2,s,kold,kkr:int64;
aeqb,agrb,bgra,koef:int64;
fl0,fl10,fl100,flag2,flag1,flag:boolean;
ott,pp1,pp2,dl1,dl2,dl3,hh,po,pt,doltek,dolpred:extended;
dist:array[-10..3010,-10..3010] of int64;
ddd,distot:double;
ak,bk,c,b,a,zz,x,y: array[-300000..500000] of int64;
zapx,zapy:array[0..20000] of boolean;
gr1,gr: array[-50..2000,-50..2000] of int64;
ee,deg,marked:array[-100000..250000] of int64;
{ss:array[0..2000000] of char; }
sss1,sss,sss2:string;
ab:array[-100..200,-100..201,-100..201] of char;
ch11,ch12,ch1,ch:char;
sl,sr :array[-10 ..200000] of int64;
ssot:array[-1000..1100000] of char;
stepen:array[0..1000] of int64;
name:array[0..2000] of string;
function min (a,b:int64):int64;begin min:=b;if a<b then min:=a;  end;
function max (a,b:int64):int64;begin max:=b;if a>b then max:=a;  end;

    function nod(a,b:int64):int64; var p,t:int64;
begin if (a>0)and(b>0) then
   begin while (b>0) do begin t:=a mod b;a:=b;b:=t;    end;
    p:=a;
   end else if a=0 then p:=b else p:=a;
nod:=p;
end;

function degg(a,k:int64):int64; var p:int64;
begin
 if k=0 then degg:=1 else if odd(k) then degg:=degg(a,k-1)*a mod modul else
   begin  p:=degg(a,k div 2); degg:=p*p mod modul;   end;

end;

begin
 {assign (input,'input.txt');reset(input);
      assign (output,'output.txt'); rewrite(output);
  }
                              modul:=1000000007 ;
read(a1,b1,a2,b2);
if (a2*b1<a1*b2) then begin   p:=a2*b1; q:=a1*b2;  end else begin q:=a2*b1; p:=a1*b2;          end;
p:=-p+q;
t:=nod(p,q);
writeln(p div t,'/',q div t);

   1:          close(output);

end.

program prog1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

   var  s1, s,n,m,i,j,k,t,a,b,c,d,x,y: integer;
     mas:  array [1..1000] of integer;

procedure swap(var x,y: Integer);
var t: integer;
begin
   t:=x;
   x:=y;
   y:=t;
end;

function nod(aa,bb: integer): integer;
var i,j,k: integer;
begin
  i:=aa;
  j:=bb;
   repeat
     k:=i mod j;
     i:=j;
     j:=k;
   until  k=0;
   nod:=i;

end;

begin

    Readln(a,b,c,d);
  if (c<=a) and (d<=b) then
  begin
      if (a/c)<(b/d) then
      begin
          x:=b*c-a*d;
          y:=b*c;
      end
      else
      begin
          x:=a*d-b*c ;
          y:=a*d;
      end;
  end;

  if  (c>a)or (d>b) then
  begin
      if (a/c)<(b/d) then
      begin
          x:=b*c-a*d;
          y:=b*c;
      end
      else
      begin
          x:=a*d-b*c ;
          y:=a*d;
      end;
  end;

  k:=nod(x,y);
  x:=x div k;
  y:=y div k;

   Writeln(x,'/',y);

end.

program prog1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

   var  s1, s,n,m,i,j,k,t,a,b,c,d,x,y: integer;
     mas:  array [1..1000] of integer;

procedure swap(var x,y: Integer);
var t: integer;
begin
   t:=x;
   x:=y;
   y:=t;
end;

function nod(aa,bb: integer): integer;
var i,j,k: integer;
begin
  i:=aa;
  j:=bb;
   repeat
     k:=i mod j;
     i:=j;
     j:=k;
   until  k=0;
   nod:=i;

end;

begin

    Readln(a,b,c,d);

      if (a/c)<(b/d) then
      begin
          x:=b*c-a*d;
          y:=b*c;
      end
      else
      begin
          x:=a*d-b*c ;
          y:=a*d;
      end;

  k:=nod(x,y);
  x:=x div k;
  y:=y div k;

   Writeln(x,'/',y);

end.

program Project2;

{$APPTYPE CONSOLE}

uses
    SysUtils;

var
    a, b, c, d, s , s1, t, x: integer;
function nod (z, q: integer): integer;
begin
    if (z < q) then
    begin
        x := z;
        z := q;
        q := x;
    end;
    while (z > 0) and (q > 0) do
    begin
        x := z mod q;
        z := q;
        q := x;
    end;
    result := z;
end;
begin
    readln(a, b, c, d);
    s := a * d;
    s1 := b * c;
    t := nod(s, s1);
    if (s < s1) then
    begin
        x := s;
        s := s1;
        s1 := x;
    end;
    s := s div t;
    s1 := s1 div t;
    writeln(s - s1, '/', s);
    readln;
end.

program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  x,x1,y,y1,k,z,z1,i:Integer;
function min(x,y:Integer):Integer;
begin
  if (x<y) then
    min:=x
  else
    min:=y;
end;
function max(x,y:Integer):Integer;
begin
  if (x>y) then
    max:=x
  else
    max:=y;
end;
begin
  readln(x,y,x1,y1);
  x:=x*y1;
  y:=y*x1;
  for i:=1000000 downto 2 do
    while (x mod i=0) and (y mod i=0) and ((x>0) or (y>0)) do
    begin
      x:=x div i;
      y:=y div i;
    end;
  write(max(x,y)-min(x,y),'/',max(x,y));
  readln;
  readln;
end.

program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  maxx,minn,s,a,b,c,d,x,y:integer;
function nod(x,y:integer):integer;
begin
   if(x<>0)then
     nod:=nod(y mod x,x)
   else
     nod:=y;
end;
function max(a,b:integer):integer;
begin
  if(a>b)then
    max:=a
  else
    max:=b;
end;
function min(a,b:integer):integer;
begin
  if(a<b)then
    min:=a
  else
    min:=b;
end;
begin
  readln(a,b,c,d);
  x:=a*d;
  y:=b*c;
  s:=nod(x,y);
  x:=x div s;
  y:=y div s;
  maxx:=max(x,y);
  minn:=min(x,y);
  writeln(maxx-minn,'/',maxx);
  readln;
  readln;
end.

program B;

{$APPTYPE CONSOLE}
{$O-}

uses
  SysUtils;

var
a,b1,c,d,x,y:integer;
f:boolean;

procedure swap1(var a,b1:integer);
var c:Integer;
begin
c:=a;
a:=b1;
b1:=c;
end;

{procedure qsort1 (var a:mt; l,r:Integer);
var i,j:byte;
x:integer;
begin
  if l>=r then Exit;
  i:=l;
  j:=r;
  x:=a[random(r-l+1)+l];
 repeat
    while a[i]<x do i:=i+1;
    while a[j]>x do j:=j-1;
    if i<=j then
    begin
    swap(a[i],a[j]);
    i:=i+1;
    j:=j-1;
    end;

 until i>j;
 qsort1(a,l,j);
 qsort1(a,i,r);

end;}
function NOD(a,b1:integer):integer;
var x,y:integer;
begin
  x:=a;
  y:=b1;
  while x mod y<>0 do
  begin
    x:=x mod y;
    if x<y then swap1(x,y);
  end;
NOD:=y;
end;
procedure del(var l1,l2:integer);
var x,e:integer;
begin
  x:=l1;
  e:=l2;
  l1:=l1 div nod(l2,l1);
  l2:=l2 div nod(l2,x);
end;

begin
  {reset(input,'in.txt');
  rewrite(output,'out.txt');}
  Read(a,b1,c,d);
  if a*d>c*b1 then
  begin
    x:=a*d-c*b1;
    y:=a*d;
    del(y,x);
  end else
   begin
    x:=b1*c-a*d;
    y:=b1*c;
    del(y,x);
   end;
   write (x,'/',y);

  { TODO -oUser -cConsole Main : Insert code here }
end.

Const
   fin = '';
   fon = '';
Var
   x1 , x2 , y1 , y2 , kq : Longint;
Procedure Start;
   Begin
      Assign (input , fin);
      Reset (input);
      Assign (output , fon);
      Rewrite (output);
   End;
Procedure Tries (a , b: Longint);
   Var tmp : Longint;
   Begin
      if (a Mod b) <> 0 then
      begin
         tmp := b;
         b := a Mod b;
         a := tmp;
         Tries (a , b);
      end
      else kq := b;
   End;
Procedure Programe;
   Var t , tmp1 , tmp2 : Longint;
   Begin
      readln (x1 , y1 , x2 , y2);
      tmp1 := y1 * x2;
      tmp2 := x1 * y2;
      if tmp1 < tmp2 then
      begin
         t := tmp1;
         tmp1 := tmp2;
         tmp2 := t;
      end;
      Tries (tmp1 , tmp2);
      tmp1 := tmp1 Div kq;
      kq := tmp1 - (tmp2 Div kq);
      writeln (kq , '/' , tmp1);
   End;
Procedure Finish;
   Begin
      Close (input);
      Close (output);
   End;
Begin
   Start;
   Programe;
   Finish;
End.

var
  a1,b1,a2,b2,i,j,k,l,m,n,md:longint;
procedure gcd(y,z:longint);
var
  q,o,p:longint;
begin
  if y mod z=0 then md:=z
  else begin
  q:=z;
  z:=y mod z;
  y:=q;
  gcd(y,z);
  end;
end;
begin
  readln(a1,b1,a2,b2);
  i:=b1*a2;
  j:=a1*b2;
  if i<j then begin
  k:=i;
  i:=j;
  j:=k;
  end;
  gcd(i,j);
  i:=i div md;
  j:=j div md;
  writeln(i-j,'/',i);
end.

var
e,t,y:extended;
q,w,r,u,i,o,p,a,b,c,d:extended;
function nod(v,b:longint):extended;
begin
if b=0 then nod:=v else nod:=nod(b,v mod b);
end;

begin
read(a,b,c,d);
//writeln(nod(round(a),round(b)));

if a/b<c/d then
        begin
        e:=a; a:=b; b:=e;
        e:=c; c:=d; d:=e;
        end;
              {
        c:=c*b/d;
        d:=b;
        t:=(a-c)*d;
        a:=a*d;
        e:=nod(round(t),round(a));}
t:=a*d-c*b;
a:=a*d;        e:=nod(round(a),round(t));
writeln(round(t/e),'/',round(a/e));

 {
e:=nod(round(t),round(y));
writeln(round(t/e),'/',round(y/e)); }
//writeln(a,' ',b,' ',c,' ',d,' ',t);

end.

Uses math;
Var a,b,c,d,ans,ans1,a1,b1,c1,d1,x1,x2,x3,x4,t:Int64;
   i,j:LongInt;
  begin
    ans1:=maxLongINt;
    ans:=0;
    Read(a,b,c,d);
    For i:=1 to 1000 do
    For j:=1 to 1000 do
      begin
        a1:=a*i;
        b1:=b*i;
        c1:=c*j;
        d1:=d*j;
        if (a1*b1>=c1*d1) and (c1<=a1) and (d1<=b1) then
         begin
           x1:=a1*b1;
           x2:=c1*d1;
           x3:=x1;
           x4:=x2;
           While (x3>0) and (x4>0) do
            if x3>x4 then x3:=x3 mod x4
            else x4:=x4 mod x3;
           x1:=x1 div (x3+x4);
           x2:=x2 div (x3+x4);
           if x2/x1>ans/ans1 then begin ans:=x2; ans1:=x1; end;
         end;
      end;
    WriteLn(ans1-ans,'/',ans1);
  end.

program pa1;

type
    fraction=record
                   p,q:int64;
             end;

var
   a,b,c,d:int64;
   ars,arm:real;
   vr,hr,br,ans:fraction;

function gcd(x,y:int64):int64;
begin
     if ((x=0) and (y=0)) then exit(1);
     if (x=0) then exit(y);
     if (y=0) then exit(x);
     if (x<y) then exit(gcd(y,x));
     if (y=0) then exit(x);
     exit(gcd(y,x mod y));
end;

function reduce(f:fraction):fraction;
var
   g:int64;
begin
     g:=gcd(f.p,f.q);
     f.p:=f.p div g;
     f.q:=f.q div g;
     exit(f);
end;

function gt(f1,f2:fraction):boolean;
begin
     if ((f1.p*f2.q)>(f2.p*f1.q)) then exit(true) else exit(false);
end;

begin
     // axb , cxd
     readln(a,b,c,d);
     vr.p:=c;
     vr.q:=a;
     hr.p:=d;
     hr.q:=b;
     if (gt(vr,hr)) then
     begin
          br:=vr;
     end
     else
     begin
          br:=hr;
     end;
     {writeln(br.p,'/',br.q);}

     ans.q:=a*b*br.p*br.p;
     ans.p:=(a*b*br.p*br.p)-((c*d*br.q*br.q));
     ans:=reduce(ans);
     writeln(ans.p,'/',ans.q);
end.

program pa1;

type
    fraction=record
                   p,q:int64;
             end;

var
   a,b,c,d:int64;
   ars,arm:real;
   vr,hr,br,ans:fraction;

function gcd(x,y:int64):int64;
begin

     if (x<y) then exit(gcd(y,x));
     if (y=0) then exit(x);
     exit(gcd(y,x mod y));
end;

function reduce(f:fraction):fraction;
var
   g:int64;
begin
     g:=gcd(f.p,f.q);
     f.p:=f.p div g;
     f.q:=f.q div g;
     exit(f);
end;

function gt(f1,f2:fraction):boolean;
begin
     if ((f1.p*f2.q)>(f2.p*f1.q)) then exit(true) else exit(false);
end;

begin
     // axb , cxd
     readln(a,b,c,d);
     vr.p:=c;
     vr.q:=a;
     hr.p:=d;
     hr.q:=b;
     if (gt(vr,hr)) then
     begin
          br:=vr;
     end
     else
     begin
          br:=hr;
     end;
     {writeln(br.p,'/',br.q);}

     ans.q:=a*b*br.p*br.p;
     ans.p:=(a*b*br.p*br.p)-((c*d*br.q*br.q));
     ans:=reduce(ans);
     writeln(ans.p,'/',ans.q);
end.

var a,b,c,d: LongInt;

function nsd(x,y: LongInt): LongInt;
var res: LongInt;
begin
  while (x>0) and (y>0) do
  if x>y then x:=x mod y else y:=y mod x;
  nsd:=x+y;
end;

begin
  Readln(a,b,c,d);
  if a*d<b*c then Writeln((b*c-a*d) div nsd(b*c-a*d,b*c),'/',b*c div nsd(b*c-a*d,b*c)) else
  Writeln((a*d-b*c) div nsd(a*d-b*c,a*d),'/',a*d div nsd(a*d-b*c,a*d));
end.

var a,b,c,d,x,y:longint;
function gcd(m,n:longint):longint;
var x,y:longint;
begin
    x:=m;
    y:=n;
    while x<>y do
        if x mod y=0 then
            x:=y
        else
            if y mod x=0 then
                y:=x
            else
                if x>y then
                    x:=x mod y
                else
                    y:=y mod x;
    gcd:=x;
end;
begin
    readln(a,b,c,d);
    if a*d>b*c then begin
        x:=a*d-b*c;
        y:=a*d;
    end
    else begin
        x:=b*c-a*d;
        y:=b*c;
    end;
    writeln(x div gcd(x,y),'/',y div gcd(x,y));
    readln;
end.

program ddd;
var a,b,c,d,ch1,ch2,k:longint;
function nsd(x,y:longint):longint;
begin
 if x>0 then nsd:=nsd(y mod x,x) else nsd:=y;
end;
begin
 read(a,b,c,d);
 ch1:=a*d;
 ch2:=b*c;
 if ch1>ch2 then
  begin
   k:=nsd(ch1-ch2,ch1);
   writeln((ch1-ch2) div k,'/',ch1 div k);
   end else
   begin
    k:=nsd(ch2-ch1,ch2);
    writeln((ch2-ch1) div k,'/',ch2 div k);
   end;
  end.

var a,b,c,d:longint;

function gcd(x1,x2:longint):longint;
var tmp:longint;
begin
  while x2<>0 do
  begin
    tmp:=x1 mod x2;
	x1:=x2;x2:=tmp;
  end;
  exit(x1);
end;

function work1:boolean;
var tmp,x1,x2,y1,y2,y3:longint;
begin
  tmp:=a*c div gcd(a,c);
  x1:=b*tmp div a;
  x2:=d*tmp div c;
  if x1<x2 then exit(false);
  y1:=x1-x2;y2:=x1;
  y3:=gcd(y1,y2);
  writeln(y1 div y3,'/',y2 div y3);
  exit(true);
end;

procedure work2;
var tmp,x1,x2,y1,y2,y3:longint;
begin
  tmp:=b*d div gcd(b,d);
  x1:=a*tmp div b;
  x2:=c*tmp div d;
  y1:=x1-x2;y2:=x1;
  y3:=gcd(y1,y2);
  writeln(y1 div y3,'/',y2 div y3);
end;

procedure main;
var tmp:longint;
begin
  readln(a,b,c,d);
  tmp:=gcd(a,b);
  a:=a div tmp;b:=b div tmp;
  tmp:=gcd(c,d);
  c:=c div tmp;d:=d div tmp;
  //writeln(a,' ',b,' ',c,' ',d);
  if (a=c)and(b=d) then
  begin
    writeln('0/1');exit;
  end;
  if not(work1) then work2;
end;

begin
  //assign(input,'1.in');
  //reset(input);
  main;
  //close(input);
end.

program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  x,x1,y,y1,x2,y2:Integer;
function max(x,y:Integer):Integer;
begin
  if (x>y) then
    max:=x
  else
    max:=y;
end;
begin
  readln(x,y,x1,y1);
  x2:=x1;
  y2:=y1;
  while (x1<x) and (y1<y) do
  begin
    x1:=x1+1;
    y1:=y1+1;
  end;
  write(Abs(x+x1-y-y1),'/',max(x,max(y,max(x1,y1))));
  readln;
  readln;
end.

program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  x,x1,y,y1,k,z,z1,i:Integer;
function min(x,y:Integer):Integer;
begin
  if (x<y) then
    min:=x
  else
    min:=y;
end;
function max(x,y:Integer):Integer;
begin
  if (x>y) then
    max:=x
  else
    max:=y;
end;
begin
  readln(x,y,x1,y1);
  x:=x*x1;
  y:=y*y1;
  for i:=1000000 downto 2 do
    while (x mod i=0) and (y mod i=0) and ((x>0) or (y>0)) do
    begin
      x:=x div i;
      y:=y div i;
    end;
  write(max(x,y)-min(x,y),'/',max(x,y));
  readln;
  readln;
end.

program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  x,x1,y,y1,x2,y2:Integer;
function max(x,y:Integer):Integer;
begin
  if (x>y) then
    max:=x
  else
    max:=y;
end;
begin
  readln(x,y,x1,y1);
  x2:=x1;
  y2:=y1;
  while (x1<x) and (y1<y) do
  begin
    x1:=x1+x2;
    y1:=y1+y2;
  end;
  write(Abs(x+x1-y-y1),'/',max(x,max(y,max(x1,y1))));
  readln;
  readln;
end.

program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  x,x1,y,y1,x2,y2:Integer;
function max(x,y:Integer):Integer;
begin
  if (x>y) then
    max:=x
  else
    max:=y;
end;
begin
  readln(x,y,x1,y1);
  x2:=x1;
  y2:=y1;
  while (x<x1) and (y<y1) do
  begin
    x:=x+1;
    y:=y+1;
  end;
  while (x1<x) and (y1<y) do
  begin
    x1:=x1+1;
    y1:=y1+1;
  end;
  write(Abs(x+x1-y-y1),'/',max(x,max(y,max(x1,y1))));
  readln;
  readln;
end.

var
  a,b,c,d,x,y,x1,y1:integer;
function max(a,b:integer):integer;
begin
  if(a>b)then
    max:=a
  else
    max:=b;
end;
function min(a,b:integer):integer;
begin
  if(a<b)then
    min:=a
  else
    min:=b;
end;
begin
  readln(a,b,c,d);
  x:=max(c,d);
  y:=min(c,d);
  x1:=max(a,b);
  y1:=min(a,b);
  if(a=b)and(c=d)then
    writeln(0,'/',1)
  else
  begin
    if(a=b)then
      writeln(x-y,'/',x)
    else if(c=d)then
      writeln(x1-y1,'/',x1)
    else
    begin
      if(c>d)then
        writeln(1,'/',a*b-(d-(a-c)))
      else
        writeln(1,'/',a*b-(c-(b-d)));
    end;
  end;
  readln;
  readln;
end.

{$MODE OBJFPC}
const
    saiso=0.000000001;
var
    a,b,c,d,i,j:int64;
    a1,b1,t,m:real;
    tu,mau:integer;

function gcd(a,b:integer):integer;
var
    r:integer;
begin
    while (b<>0) do
        begin
            r:=a mod b;
            a:=b;b:=r;
        end;
    exit(a);
end;

begin
    readln(a,b,c,d);
    b1:=c/a*b;a1:=d/b*a;
    if b1>=d then
        begin
            m:=b1;
            t:=b1-d;
        end else
            begin
                m:=a1;
                t:=a1-c;
            end;
    if t=0 then
        begin
            writeln(0,'/',1);
            halt;
        end;
    for tu:=1 to 4000 do
        for mau:=1 to 4000 do
            if (abs(tu/mau-t/m)<=saiso) and (gcd(tu,mau)=1) then
                begin
                    writeln(tu,'/',mau);
                    halt;
                end;
end.

{$MODE OBJFPC}
const
    saiso=0.000001;
var
    a,b,c,d,tu,mau,tg:int64;
    a1,b1,t,m,t1:real;
    dem,i,j:integer;
    nc:array[1..1000000]of integer;

function gcd(a,b:int64):int64;
var
    r:int64;
begin
    while (b<>0) do
        begin
            r:=a mod b;
            a:=b;b:=r;
        end;
    exit(a);
end;

begin
    //assign(input,'196B.INP');reset(input);
    readln(a,b,c,d);
    b1:=c/a*b;a1:=d/b*a;
    if b1>=d then
        begin
            m:=b1;
            t:=b1-d;
        end else
            begin
                m:=a1;
                t:=a1-c;
            end;
    if t=0 then
        begin
            writeln(0,'/',1);
            halt;
        end;
    t:=t/m;dem:=0;
    t1:=t;
    repeat
         inc(dem);nc[dem]:=trunc(t);
         t:=t-nc[dem];
         t:=1/t;
         if abs(round(t)-t)<=saiso then
            break;
    until false;
    tu:=1;mau:=round(t);
    for i:=dem downto 1 do
        begin
            tu:=tu+mau*nc[i];
            tg:=tu;tu:=mau;mau:=tg;
        end;
    tg:=gcd(tu,mau);
    if (mau/tu-t1)<=saiso then
        writeln(mau div tg,'/',tu div tg) else
            writeln(tu div tg,'/',mau div tg);
end.

{$MODE OBJFPC}
const
    saiso=0.000000001;
var
    a,b,c,d,i,j:int64;
    a1,b1,t,m:real;
    tu,mau:integer;

function gcd(a,b:integer):integer;
var
    r:integer;
begin
    while (b<>0) do
        begin
            r:=a mod b;
            a:=b;b:=r;
        end;
    exit(a);
end;

begin
    readln(a,b,c,d);
    b1:=c/a*b;a1:=d/b*a;
    if b1>=d then
        begin
            m:=b1;
            t:=b1-d;
        end else
            begin
                m:=a1;
                t:=a1-c;
            end;
    for tu:=1 to 4000 do
        for mau:=1 to 4000 do
            if (abs(tu/mau-t/m)<=saiso) and (gcd(tu,mau)=1) then
                begin
                    writeln(tu,'/',mau);
                    halt;
                end;
end.

Uses math;
Var a,b,c,d,i,j,ans,ans1,a1,b1,c1,d1,x1,x2,x3,x4,t:LongInt;
  begin
    ans1:=maxLongINt;
    ans:=0;
    Read(a,b,c,d);
    For i:=1 to 1000 do
      begin
        a1:=a*i;
        b1:=b*i;
        c1:=c;
        d1:=d;
        if (a1*b1>=c1*d1) and (c1<=a1) and (d1<=b1) then
         begin
           t:=min(abs(a1-c1),abs(b1-d1));
           c1:=c1+t;
           d1:=d1+t;
           x1:=a1*b1;
           x2:=c1*d1;
           x3:=x1;
           x4:=x2;
           While (x3>0) and (x4>0) do
            if x3>x4 then x3:=x3 mod x4
            else x4:=x4 mod x3;
           x1:=x1 div (x3+x4);
           x2:=x2 div (x3+x4);
           if (x1<ans1) or ((x1=ans1) and (x2>ans)) then begin ans:=x2; ans1:=x1; end;
           break;
         end;
      end;
    if ans1-ans=0 then WriteLn('1','/','1');
    WriteLn(ans1-ans,'/',ans1);
  end.

Uses math;
Var a,b,c,d,j,ans,ans1,a1,b1,c1,d1,x1,x2,x3,x4,t:Int64;
    i:LongInt;
  begin
    ans1:=maxLongINt;
    ans:=0;
    Read(a,b,c,d);
    For i:=1 to 1000 do
      begin
        a1:=a*i;
        b1:=b*i;
        c1:=c;
        d1:=d;
        if (a1*b1>=c1*d1) and (c1<=a1) and (d1<=b1) then
         begin
           t:=min(abs(a1-c1),abs(b1-d1));
           c1:=c1+t;
           d1:=d1+t;
           x1:=a1*b1;
           x2:=c1*d1;
           x3:=x1;
           x4:=x2;
           While (x3>0) and (x4>0) do
            if x3>x4 then x3:=x3 mod x4
            else x4:=x4 mod x3;
           x1:=x1 div (x3+x4);
           x2:=x2 div (x3+x4);
           if (x1<ans1) or ((x1=ans1) and (x2>ans)) then begin ans:=x2; ans1:=x1; end;
           break;
         end;
      end;
    WriteLn(ans1-ans,'/',ans1);
  end.

Uses math;
Var a,b,c,d,i,j,ans,ans1,a1,b1,c1,d1,x1,x2,x3,x4,t:LongInt;
  begin
    ans1:=maxLongINt;
    ans:=0;
    Read(a,b,c,d);
    For i:=1 to 1000 do
      begin
        a1:=a*i;
        b1:=b*i;
        c1:=c;
        d1:=d;
        if (a1*b1>=c1*d1) and (c1<=a1) and (d1<=b1) then
         begin
           t:=min(abs(a1-c1),abs(b1-d1));
           c1:=c1+t;
           d1:=d1+t;
           x1:=a1*b1;
           x2:=c1*d1;
           x3:=x1;
           x4:=x2;
           While (x3>0) and (x4>0) do
            if x3>x4 then x3:=x3 mod x4
            else x4:=x4 mod x3;
           x1:=x1 div (x3+x4);
           x2:=x2 div (x3+x4);
           if (x1<ans1) or ((x1=ans1) and (x2>ans)) then begin ans:=x2; ans1:=x1; end;
           break;
         end;
      end;
    WriteLn(ans1-ans,'/',ans1);
  end.

var a,b,c,d,zn1,zn2,ch,k,zn:longint;
function nsd(x,y:longint):longint;
begin
 if x>0 then nsd:=nsd(y mod x,x) else nsd:=y;
end;
begin
 read(a,b,c,d);
 ch:=abs(a*d-b*c);
 zn1:=b*d;
 zn2:=a*c;
 if zn1<zn2 then zn:=zn2 else zn:=zn1;
 k:=nsd(ch,zn);
 writeln(ch div k,'/',zn div k);

 end.

var
    a, b, c, d              :longint;
    lcm1, lcm2              :longint;
    x                       :longint;
    a1, a2, a3, a4          :longint;
    min1, min2              :longint;
    min                     :real;
procedure gcd(a,b:longint);
begin
     if a<b then gcd(b,a) else
     if b=0 then x:=a else gcd(b,a mod b);
end;

begin
    read(a,b,c,d);
    gcd(a,b); a:=a div x; b:=b div x;
    gcd(c,d); c:=c div x; d:=d div x;
    if (a=c) and (b=d) then
    begin
        writeln(1,'/',0);
        halt;
    end;
    gcd(a,c);
    lcm1:=a*c div x;
    a1:=a; a2:=b; a3:=c; a4:=d;
    a1:=lcm1; a3:=lcm1;
    a2:=b*lcm1 div a;
    a4:=d*lcm1 div c;
    min:=maxlongint;
    if a2>a4 then
    begin
        min1:=a2-a4; min2:=a2;
        min:=min1/min2;
    end;
    gcd(b,d);
    lcm2:=b*d div x;
    a2:=lcm2; a4:=lcm2;
    a1:=a*lcm2 div b;
    a3:=c*lcm2 div d;
    if a1>a3 then
    begin
        if (a1-a3)/a1<min then
        begin
            min1:=a1-a3;
            min2:=a1;
        end;
    end;
    gcd(min1,min2);
    min1:=min1 div x;
    min2:=min2 div x;
    writeln(min1,'/',min2);
end.

var
    a, b, c, d              :longint;
    lcm1, lcm2              :longint;
    x                       :longint;
    a1, a2, a3, a4          :longint;
    min1, min2              :longint;
    min                     :real;
procedure gcd(a,b:longint);
begin
     if a<b then gcd(b,a) else
     if b=0 then x:=a else gcd(b,a mod b);
end;

begin
    read(a,b,c,d);
    gcd(a,b); a:=a div x; b:=b div x;
    gcd(c,d); c:=c div x; d:=d div x;
    if (a=c) and (b=d) then
    begin
        writeln(0,'/',0);
        halt;
    end;
    gcd(a,c);
    lcm1:=a*c div x;
    a1:=a; a2:=b; a3:=c; a4:=d;
    a1:=lcm1; a3:=lcm1;
    a2:=b*lcm1 div a;
    a4:=d*lcm1 div c;
    min:=maxlongint;
    if a2>a4 then
    begin
        min1:=a2-a4; min2:=a2;
        min:=min1/min2;
    end;
    gcd(b,d);
    lcm2:=b*d div x;
    a2:=lcm2; a4:=lcm2;
    a1:=a*lcm2 div b;
    a3:=c*lcm2 div d;
    if a1>a3 then
    begin
        if (a1-a3)/a1<min then
        begin
            min1:=a1-a3;
            min2:=a1;
        end;
    end;
    gcd(min1,min2);
    min1:=min1 div x;
    min2:=min2 div x;
    writeln(min1,'/',min2);
end.

var a,b,c,d,temp,p,q,i:longint;
begin
 readln(a,b,c,d);
 if a*d>b*c then
  begin
   temp:=a;a:=b;b:=temp;
   temp:=c;c:=d;d:=temp;
  end;
 p:=a*d;
 q:=b*c;
 p:=q-p;
 for i:=p downto 2 do
  if (p mod i=0)and(q mod i=0) then
   begin
    p:=p div i;
    q:=q div i;
   end;
 writeln(p,'/',q);
end.

//uses math;
var
  p,a,b,n,m,k,t, l,i,j,e,i2,j2, x,x1,x2,x3,xx,y,y1,y2,y3,yy,z,z1,z2,z3,zz,w,r,c :longint;
  d:array[0..1000001]of longint;
  s:array[0..1001,0..1001]of longint;
  ans,res,max,min,sum,best:int64;
  h:boolean;
  flag:array[0..1001,0..1001]of boolean;
  q:real;

begin ans:=0;res:=0;max:=0;min:=0;sum:=0;best:=0;//assign(input,'input.txt');reset(input); assign(output,'output.txt');reset(output);
  readln(a,b,x,y);
  while (a<x) or (b<y) do
    begin a:=a*2; b:=b*2; end;
  if abs(1-a/b) > abs(1-x/y) then begin
    w:=a; a:=b; b:=w;
    w:=y; y:=x; x:=w;
  end;
  p:=y*a;
  b:=b*x;
  for i:=1000 downto 1 do
    if (p mod i=0) and (b mod i=0) then begin
      p:=p div i;
      b:=b div i;
    end;
  writeln(b-p,'/',b);
  readln; readln; //close(input); close(output);
end.

//uses math;
var
  p,a,b,n,m,k,t, l,i,j,e,i2,j2, x,x1,x2,x3,xx,y,y1,y2,y3,yy,z,z1,z2,z3,zz,w,r,c :longint;
  d:array[0..1000001]of longint;
  s:array[0..1001,0..1001]of longint;
  ans,res,max,min,sum,best:int64;
  h:boolean;
  flag:array[0..1001,0..1001]of boolean;
  q:real;

begin ans:=0;res:=0;max:=0;min:=0;sum:=0;best:=0;//assign(input,'input.txt');reset(input); assign(output,'output.txt');reset(output);
  readln(a,b,x,y);
  while (a<x) or (b<y) do
    begin a:=a*2; b:=b*2; end;
  if ( abs(1-a/b) > abs(1-x/y) ) or (y>x) then begin
    w:=a; a:=b; b:=w;
    w:=y; y:=x; x:=w;
  end;
  p:=y*a;
  b:=b*x;
  for i:=1000 downto 1 do
    if (p mod i=0) and (b mod i=0) then begin
      p:=p div i;
      b:=b div i;
    end;
  writeln(b-p,'/',b);
  readln; readln; //close(input); close(output);
end.

//uses math;
var
  p,a,b,n,m,k,t, l,j,e,i2,j2, x,x1,x2,x3,xx,y,y1,y2,y3,yy,z,z1,z2,z3,zz,w,r,c :int64;
  d:array[0..1000001]of longint;
  s:array[0..1001,0..1001]of longint;
  ans,res,max,min,sum,best:int64;
  h:boolean;
  flag:array[0..1001,0..1001]of boolean;
  i:longint;

begin ans:=0;res:=0;max:=0;min:=0;sum:=0;best:=0;//assign(input,'input.txt');reset(input); assign(output,'output.txt');reset(output);
  readln(a,b,x,y);
  while (a<x) or (b<y) do
    begin a:=a*2; b:=b*2; end;
  if ( abs(1-a/b) > abs(1-x/y) ) then inc(t);
  if y>x then inc(t);
  if t=1 then begin
    w:=a; a:=b; b:=w;
    w:=y; y:=x; x:=w;
  end;
  p:=y*a;
  b:=b*x;
  for i:=1000 downto 1 do
    if (p mod i=0) and (b mod i=0) then begin
      p:=p div i;
      b:=b div i;
    end;
  writeln(b-p,'/',b);
  readln; readln; //close(input); close(output);
end.

Var a,b,c,d,z:longint;
function nod(a,b:longint):longint;
begin
  if b>a
  then nod:=nod(b,a)
  else if b=0
       then nod:=a
       else nod:=nod(b, a mod b);
end;
begin
 // Assign(input,'input.txt'); reset(input);
 // Assign(output,'output.txt'); rewrite(output);
  read(a,b,c,d);
  z:=nod(a,b);
  a:=a div z;
  b:=b div z;
  z:=nod(c,d);
  c:=c div z;
  d:=d div z;
  if (a=c)and(b=d)
  then begin
        writeln(0);
        halt(0);
       end;
  if a*d<b*c
  then begin
        a:=(b*c-a*d);
        b:=b*c;
        z:=nod(a,b);
        a:=a div z;
        b:=b div z;
        writeln(a,'/',b);
       end
  else begin
        c:=(a*d-b*c);
        d:=a*d;
        z:=nod(c,d);
        c:=c div z;
        d:=d div z;
        writeln(c,'/',d);
       end;
end.

Var a,b,c,d,t1,t2,s:int64;

procedure tt(a,b:longint);
 begin
   while (a>0) and (b>0) do
    begin
      if a>b then a:=a mod b
      else b:=b mod a;
    end;
    s:=a+b;
 end;

   begin
     read(a,b,c,d);
     if (a>=c) and (b>=d) then begin
     t1:=b*c;
     t2:=d*a;
     tt(t1,t2);
     t1:=t1 div s;
     t2:=t2 div s;
     writeln(abs(t2-t1),'/',t1);
     end
     else begin
            t1:=b*c;
            t2:=d*a;

            tt(t1,t2);
            t1:=t1 div s;
            t2:=t2 div s;
            writeln(abs(t1-t2),'/',t1);
          end;
   end.

Var a,b,c,d,t1,t2,s:int64;

procedure tt(a,b:longint);
 begin
   while (a>0) and (b>0) do
    begin
      if a>b then a:=a mod b
      else b:=b mod a;
    end;
    s:=a+b;
 end;

   begin
     read(a,b,c,d);
     if (a>=c) and (b>=d) then begin
     t1:=b*c;
     t2:=d*a;
     tt(t1,t2);
     t1:=t1 div s;
     t2:=t2 div s;
     writeln(abs(t2-t1),'/',t1);
     end
     else begin
            t1:=b*c;
            t2:=d*a;

            tt(t1,t2);
            t1:=t1 div s;
            t2:=t2 div s;
            writeln(abs(t1-t2),'/',t1+t2);
          end;
   end.

Var a,b,c,d,t1,t2,s:int64;

procedure tt(a,b:longint);
 begin
   while (a>0) and (b>0) do
    begin
      if a>b then a:=a mod b
      else b:=b mod a;
    end;
    s:=a+b;
 end;

   begin
     read(a,b,c,d);
     if (a>=c) and (b>=d) then begin
     t1:=b*c;
     t2:=d*a;
     tt(t1,t2);
     t1:=t1 div s;
     t2:=t2 div s;
     writeln(t2-t1,'/',t2);
     end
     else begin
            t1:=b*c;
            t2:=d*a;
            tt(t1,t2);
            t1:=t1 div s;
            t2:=t2 div s;
            writeln(t1-t2,'/',t1);
          end;
   end.

{$MODE OBJFPC}
program onlylove;
uses math;
var a,b,c,d ,ans1,m,n,x,ans2: integer;
function gcd(x,y : integer) : integer;
   begin
      if y=0 then exit(x);
      exit(gcd(y,x mod y));
   end;
function lcm(x,y : integer) :integer;
  begin
    exit(x*y*gcd(x,y));
  end;
procedure th1;
  begin
   x := lcm(a,c);
   m:=x div a;
   n:=x div c;
   a:=x;
   c:=x;
   b:=b*m;
   d:=d*n;
   ans1:=abs(b-d);
   ans1:=ans1 div gcd(b,d);
   Writeln(ans1,'/',b div gcd(b,d));
  end;
procedure th2;
  begin
   x := lcm(b,d);
   m:=x div b;
   n:=x div d;
   b:=x;
   d:=x;
   a:=a*m;
   c:=c*n;
   ans1:=abs(a-c);
   ans1:=ans1 div gcd(a,c);
   Writeln(ans1,'/',a div gcd(a,c) );
  end;
begin
  readln(a,b,c,d);
  if c < d then th1 else th2;

end.

{$MODE OBJFPC}
program onlylove;
uses math;
var a,b,c,d ,ans1,m,n,x,ans2: integer;
function gcd(x,y : integer) : integer;
   begin
      if y=0 then exit(x);
      exit(gcd(y,x mod y));
   end;
function lcm(x,y : integer) :integer;
  begin
    exit(x*y*gcd(x,y));
  end;
procedure th1;
  begin
   x := lcm(a,c);
   m:=x div a;
   n:=x div c;
   a:=x;
   c:=x;
   b:=b*m;
   d:=d*n;
   ans1:=abs(b-d);
   ans1:=ans1 div gcd(b,d);
   Writeln(ans1,'/',b div gcd(b,d));
  end;
procedure th2;
  begin
   x := lcm(b,d);
   m:=x div b;
   n:=x div d;
   b:=x;
   d:=x;
   a:=a*m;
   c:=c*n;
   ans1:=abs(a-c);
   ans1:=ans1 div gcd(a,c);
   Writeln(ans1,'/',a div gcd(a,c));
  end;
begin
  readln(a,b,c,d);
  if b < d then th1 else th2;

end.

var
s,g,ss,a,b,c,d:longint;
function max(a,b:longint):longint;
begin
 if a>b then max:=a
 else max:=b;
end;
function gcd(a,b:longint):longint;
begin
 if a mod b=0 then gcd:=b
 else gcd:=gcd(b,a mod b);
end;
begin
 read(a,b,c,d);
 if a/b>c/d then
  begin
    g:=gcd(max(b,d),b+d-max(b,d));
    s:=b*d div g;
    ss:=s div b*a-s div d*c;
    writeln(ss div gcd(s div b*a,ss),'/',s div b*a div gcd(s div b*a,ss));
  end;
 if a/b<c/d then
  begin
    g:=gcd(max(a,c),a+c-max(a,c));
    s:=a*c div g;
    ss:=s div a*b-s div c*d;
    writeln(ss div gcd(s div a*b,ss),'/',s div a*b div gcd(s div a*b,ss));
  end;
end.

var
s,g,ss,a,b,c,d:longint;
function max(a,b:longint):longint;
begin
 if a>b then max:=a
 else max:=b;
end;
function gcd(a,b:longint):longint;
begin
 if a mod b=0 then gcd:=b
 else gcd:=gcd(b,a mod b);
end;
begin
 read(a,b,c,d);
 if a/b>c/d then
  begin
    g:=gcd(max(b,d),b+d-max(b,d));
    s:=b*d div g;
    ss:=s div b*a-s div d*c;
    writeln(ss div gcd(s div b*a,ss),'/',s div b*a div gcd(s div b*a,ss));
  end;
 if a/b<c/d then
  begin
    g:=gcd(max(a,c),a+c-max(a,c));
    s:=a*c div g;
    ss:=s div a*b-s div c*d;
    writeln(ss div gcd(s div a*b,ss),'/',s div a*b div gcd(s div a*b,ss));
  end;
 if a/b=c/d then writeln(0);
end.

function gcd(a,b:longint):longint;
var tmp,c:longint;
begin
	if b>a then begin
		tmp:=a;
		a:=b;
		b:=tmp;
	end;
	repeat
		c:=a mod b;
		a:=b;
		b:=c;
	until(c=0);
	exit(a);
end;

var a,b,c,d,p,q,tmp:longint;
begin
	read(a,b,c,d);
	if a*d>c*b then begin
		p:=a*d-b*c;
		q:=a*d;
	end
	else begin
		p:=b*c-a*d;
		q:=b*c;
	end;
	if p<>0 then begin
		tmp:=gcd(p,q);
		p:=p div tmp;
		q:=q div tmp;
	end;
	write(p,'/',q);
end.

function gcd(a,b:longint):longint;
var tmp,c:longint;
begin
	if b>a then begin
		tmp:=a;
		a:=b;
		b:=tmp;
	end;
	repeat
		c:=a mod b;
		a:=b;
		b:=c;
	until(c=0);
	exit(a);
end;

var a,b,c,d,p,q,tmp:longint;
begin
	read(a,b,c,d);
	if a*d>c*b then begin
		p:=a*d-b*c;
		q:=a*d;
	end
	else begin
		p:=b*c-a*d;
		q:=b*c;
	end;
	writeln(p,' ',q);
	tmp:=gcd(p,q);
	p:=p div tmp;
	q:=q div tmp;
	write(p,'/',q);
end.

Uses math;
Type
        mat=array [1..1000000] of longint;
Var     a,b,c,d,a1,b1,c1,d1:longint;
        res,kq:longint;
        fi,fo:text;

Procedure Doc;
        Var i:longint;
        Begin
                Read(fi,a,b,c,d);
                a1:=a;b1:=b;c1:=c;d1:=d;
        end;

Function Ucln(x,y:longint):longint;
        Begin
                If x=0 then exit(y);
                If y=0 then exit(x);
                If x<y then exit(Ucln(x,y mod x));
                exit(Ucln(x mod y,y));
        end;

Function Bcnn(x,y:longint):longint;
        Begin
                exit(x*y div Ucln(x,y));
        end;

Procedure Lam;
        Var u:longint;
            ok:boolean;
        Begin
                ok:=false;
                u:=Bcnn(a,c);
                b:=b*(u div a);
                d:=d*(u div c);
                a:=u;
                c:=u;
                If b>=d then
                 Begin
                        If b=d then Write(fo,0,'/',1)
                        else
                         Begin
                                kq:=u;
                                res:=b-d;
                                u:=Ucln(kq,res);
                                Write(fo,res div u,'/',kq div u);
                         end;
                        ok:=true;
                 end;
                If ok then exit;
                a:=a1;
                b:=b1;
                c:=c1;
                d:=d1;
                u:=Bcnn(b,d);
                a:=a*(u div b);
                c:=c*(u div d);
                b:=u;
                d:=u;
                If a>=c then
                 Begin
                        If a=c then Write(fo,0,'/',1)
                        else
                         Begin
                                kq:=a;
                                res:=a-c;
                                u:=Ucln(kq,res);
                                Write(fo,res div u,'/',kq div u);
                         end;
                        ok:=true;
                 end;

        end;

Procedure Inkq;
        Begin
        end;

        Begin
                Assign(fi,'');Reset(fi);
                Assign(fo,'');Rewrite(fo);
                        Doc;
                        Lam;
                        Inkq;
                Close(fo);Close(fi);
        end.

Uses math;
Type
        mat=array [1..1000000] of longint;
Var     a,b,c,d,a1,b1,c1,d1:longint;
        res,kq:longint;
        fi,fo:text;

Procedure Doc;
        Var i:longint;
        Begin
                Read(fi,a,b,c,d);
                a1:=a;b1:=b;c1:=c;d1:=d;
        end;

Function Ucln(x,y:longint):longint;
        Begin
                If x=0 then exit(y);
                If y=0 then exit(x);
                If x<y then exit(Ucln(x,y mod x));
                exit(Ucln(x mod y,y));
        end;

Function Bcnn(x,y:longint):longint;
        Begin
                exit(x*y div Ucln(x,y));
        end;

Procedure Lam;
        Var u:longint;
            ok:boolean;
        Begin
                ok:=false;
                u:=Bcnn(a,c);
                b:=b*(u div a);
                d:=d*(u div c);
                a:=u;
                c:=u;
                If b>=d then
                 Begin
                        If b=d then Write(fo,1,'/',1)
                        else
                         Begin
                                kq:=u;
                                res:=b-d;
                                u:=Ucln(kq,res);
                                Write(fo,res div u,'/',kq div u);
                         end;
                        ok:=true;
                 end;
                If ok then exit;
                a:=a1;
                b:=b1;
                c:=c1;
                d:=d1;
                u:=Bcnn(b,d);
                a:=a*(u div b);
                c:=c*(u div d);
                b:=u;
                d:=u;
                If a>=c then
                 Begin
                        If a=c then Write(fo,1,'/',1)
                        else
                         Begin
                                kq:=a;
                                res:=a-c;
                                u:=Ucln(kq,res);
                                Write(fo,res div u,'/',kq div u);
                         end;
                        ok:=true;
                 end;

        end;

Procedure Inkq;
        Begin
        end;

        Begin
                Assign(fi,'');Reset(fi);
                Assign(fo,'');Rewrite(fo);
                        Doc;
                        Lam;
                        Inkq;
                Close(fo);Close(fi);
        end.

var a, b, c, d, p, q, x, y, z: int64;
begin
        readln(a, b, c, d);
        p := abs(b * c - a * d);
        q := a * c;
        x := p;
        y := q;
        while y > 0 do
        begin
                z := x;
                x := y;
                y := z mod x;
        end;
        writeln(p div x, '/', q div x);
end.

var a,b,c,d,i,ans1,ans2:longint;
Begin
 readln(a,b,c,d);
 if c>d then begin ans1:=b*c-a*d;ans2:=b*c; end else begin ans1:=a*d-b*c;ans2:=a*d;end;
 for i:=1000 downto 1 do
  if (ans1 mod i=0)and(ans2 mod i=0) then begin ans1:=ans1 div i;ans2:=ans2 div i; end;
 writeln(ans1,'/',ans2);
End.

var a,b,c,d,i,ans1,ans2:longint;q1,q2:real;
Begin
 readln(a,b,c,d);q1:=a/c;q2:=b/d;
 if q1<q2 then begin ans1:=b*c-a*d;ans2:=b*c; end else begin ans1:=a*d-b*c;ans2:=a*d;end;
 for i:=1000 downto 1 do
  if (ans1 mod i=0)and(ans2 mod i=0) then begin ans1:=ans1 div i;ans2:=ans2 div i; end;
 writeln(ans1,'/',ans2);
End.

var a,b,c,d,i,ans1,ans2:longint;
Begin
 readln(a,b,c,d);
 if c>d then begin ans1:=b*c-a*d;ans2:=b*c; end else begin ans1:=a*d-b*c;ans2:=a*d;end;
 ans1:=abs(ans1);ans2:=abs(ans2);
 for i:=1000 downto 1 do
  if (ans1 mod i=0)and(ans2 mod i=0) then begin ans1:=ans1 div i;ans2:=ans2 div i; end;
 writeln(ans1,'/',ans2);
End.

var
  a, b, c, d,xm: longint;
  dx, dy: longint;
  tempk1, tempk2:real;
function nod(x,y:integer):integer;
begin
   if y=0 then
      nod:=x
   else
      nod:=nod(y,(x mod y))
end;
begin
  readln(a, b, c, d);
  if (a / b = 1) then begin

    if (c > d) then begin
      dx := c - d;
      dy := c;

    end
    else
    begin
      dx := d - c;
      dy := d;

    end;

  end
  else
  if (c / d = 1) then begin

    if (a > b) then begin
      dx := a - b;
      dy := a;

    end
    else
    begin
      dx := b - a;
      dy := b;

    end;

  end
  else
  //if (c>=a) or (d>=b) then
  begin
    tempk1 := c / a;
    tempk2 := d / b;
    if (tempk1 > tempk2) then
    begin
      dy := b * c - d * a;
      dx := c * a;

    end
    else
    begin
      dx := a * d - c * b;
      dy := d * b;

    end;
  end;

  writeln(dx div nod(dx,dy),'/',dy div nod(dx,dy));

end.

var a,b,c,d:longint;
procedure swap(var a,b:longint);
begin
end;
function gcd(a,b:longint):longint;
begin
  if b=0 then exit(a);
  exit(gcd(b,a mod b));
end;
begin
  readln(a,b,c,d);
  if a*d>c*b then
  begin
    swap(a,b);
    swap(c,d);
  end;
  writeln(b*c-a*d div gcd(b*c-a*d,b*c),'/',b*c div gcd(b*c-a*d,b*c));
end.

var i,j,k,n,m,p,q,a,b,c,d:longint;

   function gcd(a,b:longint):longint;
   begin
     if a mod b=0 then exit(b);
     exit(gcd(b,a mod b));
   end;

begin
  readln(a,b,c,d);
  if b*c>a*d then
  begin
    p:=c*b-a*d;
    q:=b*c;
  end
  else
  begin
    p:=a*d-c*b;
    q:=a*d;
  end;
  p:=p div gcd(q,p);
  q:=q div gcd(q,p);
  writeln(p,'/',q);
end.

var
    n, m                    :longint;
    i, j                    :longint;
    a                       :array[0..100] of longint;
    min                     :longint;

procedure swap(var a,b:longint);
var
    c                       :longint;
begin
    c:=a; a:=b; b:=c;
end;

begin
    read(n,m);
    for i:=1 to m do read(a[i]);
    for i:=1 to m do
        for j:=i+1 to m do if a[i]>a[j] then swap(a[i],a[j]);

    min:=maxlongint;
    for i:=1 to m-n+1 do if min>a[i+n-1]-a[i] then min:=a[i+n-1]-a[i];
    writeln(min);
end.

var
    a, b, c, d              :longint;
    lcm1, lcm2              :longint;
    x                       :longint;
    a1, a2, a3, a4          :longint;
    min1, min2              :longint;
    min                     :real;
procedure gcd(a,b:longint);
begin
     if a<b then gcd(b,a) else
     if b=0 then x:=a else gcd(b,a mod b);
end;

begin
    read(a,b,c,d);
    gcd(a,b); a:=a div x; b:=b div x;
    gcd(c,d); c:=c div x; d:=d div x;
    if (a=c) and (b=d) then
    begin
        writeln(0);
        halt;
    end;
    gcd(a,c);
    lcm1:=a*c div x;
    a1:=a; a2:=b; a3:=c; a4:=d;
    a1:=lcm1; a3:=lcm1;
    a2:=b*lcm1 div a;
    a4:=d*lcm1 div c;
    min:=maxlongint;
    if a2>a4 then
    begin
        min1:=a2-a4; min2:=a2;
        min:=min1/min2;
    end;
    gcd(b,d);
    lcm2:=b*d div x;
    a2:=lcm2; a4:=lcm2;
    a1:=a*lcm2 div b;
    a3:=c*lcm2 div d;
    if a1>a3 then
    begin
        if (a1-a3)/a1<min then
        begin
            min1:=a1-a3;
            min2:=a1;
        end;
    end;
    gcd(min1,min2);
    min1:=min1 div x;
    min2:=min2 div x;
    writeln(min1,'/',min2);
end.

var
x,y,a,b,c,d:longint;
Function gcd(m,n:longint):longint;
begin
if (m mod n=0) or( n mod m=0) then
  begin
  if m mod n=0 then gcd:=n;
  if n mod m=0 then gcd:=m;
  end else
  begin
  if m>n then gcd:=gcd(m mod n, n);
  if n>m then gcd:=gcd(n mod m, m);
  end;
end;
begin
read(a,b,c,d);
if a*d>b*c then
begin
x:=b*c; y:=a*d;
c:=gcd(x,y);
x:=x div c;
y:=y div c;
end;
if b*c>a*d then
begin
x:=a*d; y:=b*c;
c:=gcd(x,y);
x:=x div c;
y:=y div c;
end;
if b*c=a*d then begin x:=0; y:=1; end;
Writeln(y-x,'/',y);
end.

uses math;
  var  a , b , c , d , del , acc , bcc : longint;

function gsd(p , q : longint) : longint; begin
  if p = 0 then exit(q)
    else exit(gsd(q mod p , p));
end;

BEGIN

  readln(a , b , c , d);
  del := gsd(a , b); a := a div del; b := b div del;
  del := gsd(c , d); c := c div del; d := d div del;
  a := a * c * d; b := b * c * d;
  del := min(a div c , b div d);
  acc := a - c * del; bcc := b - d * del;
  if (acc = 0) and (bcc = 0) then begin writeln(0 , '/' , 1); halt; end;
  if acc = 0 then writeln(1 , '/' , b div bcc);
  if bcc = 0 then writeln(1 , '/' , a div acc);

END.

  var  a , b , c , d , t , p , q , cc , del : longint;

function gsd(p , q : longint) : longint; begin
  if p = 0 then exit(q)
    else exit(gsd(q mod p , p));
end;

BEGIN

  readln(a , b , c , d);
  if a > b then begin cc := a; a := b; b := cc; end;
  if c > d then begin cc := c; c := d; d := cc; end;
  del := gsd(a , b); a := a div del; b := b div del;
  del := gsd(c , d); c := c div del; d := d div del;
  t := 1; while not((a * t >= c) and (b * t >= d)) do inc(t); a := a * t; b := b * t;
  t := 1; while (c * t <= a) and (d * t <= b) do inc(t); dec(t); c := c * t; d := d * t;
  q := a * b; p := q - c * d;
  writeln(p div gsd(p , q) , '/' , q div gsd(p , q));

END.

var a,b,c,d:word; p,q:dword;
procedure hv(var x,y:word);
var z:word;
begin
        z:=x; x:=y; y:=z
end;
function ucln(x:dword; y:word):word;
var z:dword;
begin
        while y>0 do
        begin
                x:=x mod y; z:=x; x:=y; y:=z
        end;
        ucln:=x
end;
procedure tru(z:dword);
begin
        z:=z*q; p:=z-p; z:=ucln(p,q); p:=p div z; q:=q div z
end;
procedure chia(z:dword);
begin
        q:=q*z; z:=ucln(p,q); p:=p div z; q:=q div z
end;
begin
        read(a,b,c,d);
        if a<b then hv(a,b);
        if c<d then hv(c,d);
        p:=b; q:=c; p:=p*d; d:=ucln(p,q); p:=p div d; q:=q div d;
        tru(a);
        chia(a);
        write(p,'/',q)
end.

Program cf196bb;

Var

  dqa,dqb,dqc,dqd,a,b,c,d,gcdab,gcdcd,aa,bb,bl,exb,exd,exa,exc,gcdac,gcdbd,dq,ansx,ansy:Int64;

  ans:Extended;

Function Gcd(a,b:Int64):Int64;

Begin

  If (a Mod b=0) Then Exit(b) Else

    Exit(Gcd(b,a mod b));

End;

Begin

  ans:=19950920;

  Read(a,b);

  Readln(c,d);

  gcdab:=Gcd(a,b);

  gcdcd:=Gcd(c,d);

  a:=a Div gcdab;b:=b Div gcdab;

  c:=c Div gcdcd;d:=d Div gcdcd;

  aa:=a;bb:=b;

  gcdac:=Gcd(a,c);

  bl:=a*c Div gcdac Div a;

  exb:=b*bl;

  bl:=a*c Div gcdac Div c;

  exd:=d*bl;

  If exb>=exd Then Begin

    dq:=exb-exd;

    dqa:=a *c Div gcdac;

    IF dq/dqa<ans Then Begin

      ans:=dq/dqa;

      ansx:=dq;ansy:=dqa;

    End;

  End;

  gcdbd:=Gcd(b,d);

  bl:=b*d Div gcdbd Div b;

  exa:=a*bl;

  bl:=b*d Div gcdbd Div d;

  exc:=c*bl;

  IF exa>=exc Then Begin

    dq:=exa-exc;

    dqb:=b*d Div gcdbd;

    IF dq/dqb<ans Then Begin

      ans:=dq/dqb;

      ansx:=dq;ansy:=dqb;

    End;

  End;

  dq:=Gcd(ansx,ansy);

  IF ans=0 Then Begin

    ansx:=0;ansy:=1;

  End Else Begin

    ansx:=ansx Div dq;ansy:=ansy Div dq;

  End;

  Writeln(ansx,' ',ansy);

End.

var
  a,b,c,d,x,y : longint;

procedure swap(var a,b : longint);
var
  t : longint;
begin
  t := a;
  a := b;
  b := t;
end;

function gcd(a,b : longint) : longint;
begin
  if (b = 0) then
    exit(a);
  exit(gcd(b,a mod b));
end;

procedure main;
var
  t,lsy : longint;
begin
  readln(a,b,c,d);
  if (a/b = c/d) then
  begin
    writeln(0);
    exit;
  end;
  if (a/b > c/d) then
  begin
    t := gcd(b,d);
    lsy := b*d div t;
    a := a * (lsy div b);
    c := c * (lsy div d);
    b := lsy;
    d := lsy;
    x := abs(a-c);
    y := a;
    if (x > y) then
      swap(x,y);
    t := gcd(x,y);
    x := x div t;
    y := y div t;
    writeln(x,'/',y);
  end;
  if (a/b < c/d) then
  begin
    t := gcd(a,c);
    lsy := a*c div t;
    b := b * (lsy div a);
    d := d * (lsy div c);
    a := lsy;
    c := lsy;
    x := abs(b-d);
    y := b;
    if (x > y) then
      swap(x,y);
    t := gcd(x,y);
    x := x div t;
    y := y div t;
    writeln(x,'/',y);
  end;
end;

begin
  main;
end.

program zaD_1;
 var i,j,kol,n,m,a,b,c,d,k,t,x,min,nod:longint;
 s:int64;
 //a:array[0..1000000]of longint;
 function gcd(m,n:longint):longint;
  var modulo:longint;
   begin
        modulo:=m mod n;
         if modulo = 0 then
          gcd:=n
          else
          gcd:=gcd(n,modulo);
   end;

BEGIN
    { assign(input,'input.txt');
     assign(output,'output.txt');
     reset(input);
     rewrite(output);}
     readln(a,b,c,d);
     nod:=gcd(a,b);
     a:=a div nod;
     b:=b div nod;

     nod:=gcd(c,d) ;
     c:=c div nod;
     d:=d div nod;

     //kof:=c/d;

     if ((a*d)/c)<=b then
      begin
           k:=b*c;
           k:=k-(a*d);
           nod:=gcd(k,c*b);
           writeln(k div nod,'/',(c*b) div nod);
      end
     else
      begin
           k:=a*c;
           k:=k-(b*d);
           nod:=gcd(k,c*a);
           writeln(k div nod,'/', c*a div nod);
      end;

END.

Const Pt=100000000000;
Var i,j,k:longint;
	a,b,c,d,pos,fm,pos1,fm1:longint;
    p:extended;

Procedure Swap(var x,y:longint);
  var temp:longint;
   begin
    temp:=x; x:=y; y:=temp;
   end;

Function Gcd(x,y:longint):longint;
   begin
    if y=0 then exit(x)
	 else exit(Gcd(y,x mod y));
   end;

Begin
 read(a,b,c,d);
 if a<b then Swap(a,b);
 if c<d then Swap(c,d);
 if d*(a/c)<=b then
  begin
   pos:=b*c-a*d; fm:=c*b;
   pos1:=pos; fm1:=fm;
   pos:=pos div Gcd(pos1,fm1);
   fm:=fm div Gcd(pos1,fm1);
  end
 else
  begin
   pos:=a*d-c*b; fm:=a*d;
   pos1:=pos; fm1:=fm;
   pos:=pos div Gcd(pos1,fm1);
   fm:=fm div Gcd(pos1,fm1);
  end;
 writeln(pos,'/',fm);
End.

Const Pt=100000000000;
Var i,j,k:longint;
	a,b,c,d,pos,fm,pos1,fm1:longint;
    p:extended;

Procedure Swap(var x,y:longint);
  var temp:longint;
   begin
    temp:=x; x:=y; y:=temp;
   end;

Function Gcd(x,y:longint):longint;
   begin
    if y=0 then exit(x)
	 else exit(Gcd(y,x mod y));
   end;

Begin
 read(a,b,c,d);
 if a<b then Swap(a,b);
 if c<d then Swap(c,d);
 if d*a<=b*c then
  begin
   pos:=b*c-a*d; fm:=c*b;
   pos1:=pos; fm1:=fm;
   pos:=pos div Gcd(pos1,fm1);
   fm:=fm div Gcd(pos1,fm1);
  end
 else
  begin
   pos:=a*d-c*b; fm:=a*d;
   pos1:=pos; fm1:=fm;
   pos:=pos div Gcd(pos1,fm1);
   fm:=fm div Gcd(pos1,fm1);
  end;
 writeln(pos,'/',fm);
End.

program bb;
var
        a , b , c , d , bc , ta , tb , tc , td , t1 ,t2 , du : int64;
        kq1 : double;
function ucln ( x , y : int64 ) : int64;
var
        r : int64;
begin
        if x = 0 then exit ( x );
        while y <> 0 do
                begin
                        r := x mod y;
                        x := y;
                        y := r;
                end;
        exit ( x );
end;
begin
        readln ( a , b , c , d );
        du := ucln ( a ,b );
        a := a div du;
        b := b div du;
        du := ucln ( c , d );
        c := c div du;
        d := d div du;
        bc := a * c div ucln ( a , c );
        ta := bc; tb := b * bc div a;
        tc := bc; td := d * bc div c;
        kq1 := maxlongint;
        if td < tb then
                begin
                        du := tb - td ;
                        kq1 := du / tb;
                        bc := ucln ( du , tb );
                        if bc = 0 then
                                begin
                                        t1 := 0; t2 := 0;
                                end
                        else
                                begin
                                        t1 :=du div bc ;
                                        t2 := tb div bc;
                                end;

                end;
        bc := b * d div ucln ( b , d );
        ta := a * bc div b; tb := bc;
        tc := c * bc div d; td := bc;
        if tc < ta then
                begin
                         du := ta - tc;
                        if kq1 > du / ta then
                                begin
                                        bc := ucln ( du , ta );
                                        if bc = 0 then
                                                begin
                                                        t1 := 0; t2 := 0;
                                                end
                                    else
                                                begin
                                                        t1 := du div bc;
                                                        t2 := ta div bc;
                                                end;
                                end;
                end;
        writeln ( t1 , '/' , t2 );
end.

program bb;
var
        a , b , c , d , bc , ta , tb , tc , td , t1 ,t2 , du : int64;
        kq1 : double;
function ucln ( x , y : int64 ) : int64;
var
        r : int64;
begin
        if x = 0 then exit ( x );
        while y <> 0 do
                begin
                        r := x mod y;
                        x := y;
                        y := r;
                end;
        exit ( x );
end;
begin
        readln ( a , b , c , d );
        du := ucln ( a ,b );
        a := a div du;
        b := b div du;
        du := ucln ( c , d );
        c := c div du;
        d := d div du;
        bc := a * c div ucln ( a , c );
        ta := bc; tb := b * bc div a;
        tc := bc; td := d * bc div c;
        kq1 := maxlongint;
        if td < tb then
                begin
                        du := tb - td ;
                        kq1 := du / tb;
                        bc := ucln ( du , tb );
                        if bc = 0 then
                                begin
                                        t1 := 0; t2 := 1;
                                end
                        else
                                begin
                                        t1 :=du div bc ;
                                        t2 := tb div bc;
                                end;

                end;
        bc := b * d div ucln ( b , d );
        ta := a * bc div b; tb := bc;
        tc := c * bc div d; td := bc;
        if tc < ta then
                begin
                         du := ta - tc;
                        if kq1 > du / ta then
                                begin
                                        bc := ucln ( du , ta );
                                        if bc = 0 then
                                                begin
                                                        t1 := 0; t2 := 1;
                                                end
                                    else
                                                begin
                                                        t1 := du div bc;
                                                        t2 := ta div bc;
                                                end;
                                end;
                end;
        writeln ( t1 , '/' , t2 );
end.