Manao has a monitor. The screen of the monitor has horizontal to vertical length ratio a:b. Now he is going to watch a movie. The movie's frame has horizontal to vertical length ratio c:d. Manao adjusts the view in such a way that the movie preserves the original frame ratio, but also occupies as much space on the screen as possible and fits within it completely. Thus, he may have to zoom the movie in or out, but Manao will always change the frame proportionally in both dimensions.

Calculate the ratio of empty screen (the part of the screen not occupied by the movie) to the total screen size. Print the answer as an irreducible fraction p / q.


-----Input-----

A single line contains four space-separated integers a, b, c, d (1 ≤ a, b, c, d ≤ 1000).


-----Output-----

Print the answer to the problem as "p/q", where p is a non-negative integer, q is a positive integer and numbers p and q don't have a common divisor larger than 1.


-----Examples-----
Input
1 1 3 2

Output
1/3

Input
4 3 2 2

Output
1/4



-----Note-----

Sample 1. Manao's monitor has a square screen. The movie has 3:2 horizontal to vertical length ratio. Obviously, the movie occupies most of the screen if the width of the picture coincides with the width of the screen. In this case, only 2/3 of the monitor will project the movie in the horizontal dimension: [Image]

Sample 2. This time the monitor's width is 4/3 times larger than its height and the movie's frame is square. In this case, the picture must take up the whole monitor in the vertical dimension and only 3/4 in the horizontal dimension: [Image]

Difficulty: interview

Starter code:

Solutions:
from fractions import Fraction,gcd

a,b,c,d = [int(x) for x in input().split()]

if a*d > b*c:
    num = a*d-b*c
    denom = a*d
else:
    num = b*c-a*d
    denom = b*c
div = gcd(num,denom)
print('%d/%d'%(num//div,denom//div))


from fractions import gcd
a,b,c,d = list(map(int, input().split()))
ax, bx, cx, dx = a,b,c,d

a,b,c,d = a*d, b*d, c*b, d*b

monitor = a*b
film = c*d
negru = monitor - film

monitor, negru = monitor//gcd(monitor, negru), negru//gcd(monitor, negru)
ans1 = (negru, monitor)


a,b,c,d = bx, ax, dx, cx
a,b,c,d = a*d, b*d, c*b, d*b

monitor = a*b
film = c*d
negru = monitor - film

monitor, negru = monitor//gcd(monitor, negru), negru//gcd(monitor, negru)
ans2 = (negru, monitor)




if ans1[1] == 0 or ans1[0] / ans1[1] < 0:
    sol = ans2
elif ans2[1] == 0 or ans2[0] / ans2[1] < 0:
    sol = ans1
else:
    if ans1[0] / ans1[1] < ans2[0] / ans2[1]: sol = ans1
    else: sol = ans2

print('%i/%i' % sol)
    



import fractions

def solve(a, b, c, d):
    if a * d == b * c:
        return "0/1"
    elif a / c > b / d:
        return str(fractions.Fraction(a * d - c * b, a * d))
    else:
        return str(fractions.Fraction(c * b - a * d, c * b))

def test():
    assert solve(1, 1, 3, 2) == "1/3"
    assert solve(4, 3, 2, 2) == "1/4"
    assert solve(1, 1, 1, 1) == "0/1"
    print("test passes")

##test()
a, b, c, d = tuple(map(int, input().split()))
print(solve(a, b, c, d))
    


from fractions import Fraction

def __starting_point():
    inp = input()
    arr = inp.split(" ")
    a = Fraction(int(arr[0]),1)
    b = Fraction(int(arr[1]),1)
    c = Fraction(int(arr[2]),1)
    d = Fraction(int(arr[3]),1)


    if d*a == c*b:
        ans=Fraction(0,1)
    elif d*a<c*b:
        ans = (b-(d*(a/c)))/b
    else:
        ans = (a-(c*(b/d)))/a
    
    print(ans.numerator,end='')
    print('/',end='')
    print(ans.denominator)

__starting_point()

a, b, c, d = list(map(int, input().split()))


def largest_div(n, m):
    while m > 0:
        rest = n % m
        n = m
        m = rest
    return n

if a/b == c/d:
    print("0/1")
else:
    if a/b > c/d:  # full height
        f_new_width = c * b
        f_upper = d * a - f_new_width
        f_lower = d * a
    else:  # full width
        f_new_height = d * a
        f_upper = c * b - f_new_height
        f_lower = c * b


    div = largest_div(f_upper, f_lower)
    print("/".join((str(int(f_upper/div)), str(int(f_lower/div)))))


3

import sys
from fractions import Fraction

a, b, c, d = list(map(int, sys.stdin.readline().strip().split()))
d2 = Fraction(d*a, c)
ans = None
if d2 <= Fraction(b):
    # fits left-to-right
    ans = (Fraction(b) - d2) / Fraction(b)
else:
    # fits top-to-bottom
    c2 = Fraction(c*b, d)
    ans = (Fraction(a) - c2) / Fraction(a)

if ans.denominator == 1:
    print("%d/1" % ans.numerator)
else:
    print(ans)


from math import *
def GCD(a, b):
	while (b):
		a %= b
		a, b = b, a
	return a
a, b, c, d = map(int, input().split())
C, D = min(a*d,b*c), max(a*d,b*c)
C = D - C
G = GCD(C, D)
C = C // G
D = D // G
print (str(C) + "/" + str(D))

from fractions import Fraction
from decimal import Decimal
a, b, c, d = list(map(int, input().split()))
ans = max(Fraction((a * d - b * c)/ (a * d)).limit_denominator(), Fraction((b * c - a * d) / (b * c)).limit_denominator())
if ans == 0:
    ans = '0/1'
print(ans)


from fractions import gcd


def socr(a, b):
    tmp = gcd(a, b)
    return a // tmp, b // tmp

a, b, c, d = list(map(int, input().split()))

ans = socr(a * d - b * c, a * d)
a, b = b, a
c, d = d, c
ans = socr(a * d - b * c, a * d) if ans[0] < 0 or ans[1] < 0 else ans
print(str(int(ans[0])) + '/' + str(int(ans[1])))


from fractions import gcd,Fraction,Decimal
a,b,c,d=map(int,input().split())

##c->a
##d->b
if(a/b<c/d):
    N=(b*c)-(a*d)
    D=b*c
else:
    N=(a*d)-(b*c)
    D=a*d

x=gcd(N,D)

print(N//x,end="/")
print(D//x)




import sys


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


class Fraction:
    def __init__(self, p = 0, q = 1, reduced = True):
        if type(p) == int:
            self.p = p
            if type(q) == int:
                self.q = q
        elif type(p) == Fraction:
            self.p = p.p
            self.q = p.q
        else:
            i = p.find(' ')
            if i == -1:
                i = p.find('/')
            if i == -1:
                self.p = int(p)
                self.q = 1
            else:
                self.p = int(p[:i])
                self.q = int(p[i + 1:])
        if reduced:
            self.reduce()

    def reduce(self):
        g = gcd(self.p, self.q)
        self.p //= g
        self.q //= g

    def __str__(self):
        if self.q == 1:
            return(str(self.p))
        else:
            return(str(self.p) + '/' + str(self.q))

    def __lt__(self, other):
        self.reduce()
        if type(other) == float or type(other) == int:
            return self.p < other * self.q
        else:
            other.reduce()
            return self.p * other.q < self.q * other.p

    def __le__(self, other):
        self.reduce()
        if type(other) == float or type(other) == int:
            return self.p <= other * self.q
        else:
            other.reduce()
            return self.p * other.q <= self.q * other.p

    def __gt__(self, other):
        self.reduce()
        if type(other) == float or type(other) == int:
            return self.p > other * self.q
        else:
            other.reduce()
            return self.p * other.q > self.q * other.p

    def __ge__(self, other):
        self.reduce()
        if type(other) == float or type(other) == int:
            return self.p >= other * self.q
        else:
            other.reduce()
            return self.p * other.q >= self.q * other.p

    def __eq__(self, other):
        self.reduce()
        if type(other) == float or type(other) == int:
            return self.p == other * self.q
        else:
            other.reduce()
            return self.p * other.q == self.q * other.p

    def __ne__(self, other):
        self.reduce()
        if type(other) == float or type(other) == int:
            return self.p != other * self.q
        else:
            other.reduce()
            return self.p * other.q != self.q * other.p

    def __mul__(self, other):
        self.reduce()
        if type(other) == int:
            return Fraction(self.p * other, self.q)
        elif type(other) == float:
            return self.p * other / self.q
        else:
            return Fraction(self.p * other.p, self.q * other.q)

    def __rmul__(self, other):
        self.reduce()
        if type(other) == int:
            return Fraction(self.p * other, self.q)
        elif type(other) == float:
            return self.p * other / self.q
        else:
            return Fraction(self.p * other.p, self.q * other.q)

    def __imul__(self, other):
        self = self * other
        return self

    def __truediv__(self, other):
        self.reduce()
        if type(other) == int:
            return Fraction(self.p, self.q * other)
        elif type(other) == float:
            return self.p / self.q / other
        else:
            return Fraction(self.p * other.q, self.q * other.p)

    def __rtruediv__(self, other):
        self.reduce()
        if type(other) == int:
            return Fraction(self.q * other, self.p)
        elif type(other) == float:
            return other * self.q / self.p
        else:
            return Fraction(self.q * other.p, self.p * other.q)

    def __itruediv__(self, other):
        self = self / other
        return self

    def __pow__(self, other):
        if type(other) == int:
            if other >= 0:
                return Fraction(self.p ** other, self.q ** other, False)
            else:
                return Fraction(self.q ** (-other), self.p ** (-other), False)
        elif type(other) == float:
            return (self.p / self.q) ** other
        else:
            return (self.p / self.q) ** (other.p / other.q)

    def __rpow__(self, other):
        if type(other) == int or type(other) == float:
            return other ** (self.p / self.q)
        else:
            return (other.p / other.q) ** (self.p / self.q)

    def __ipow__(self, other):
        self = self ** other
        return self

    def __add__(self, other):
        self.reduce()
        if type(other) == int:
            return Fraction(self.p + self.q * other, self.q)
        elif type(other) == float:
            return self.p / self.q + other
        else:
            return Fraction(self.p * other.q + self.q * other. p, self.q * other.q)

    def __radd__(self, other):
        self.reduce()
        if type(other) == int:
            return Fraction(self.p + self.q * other, self.q)
        elif type(other) == float:
            return self.p / self.q + other
        else:
            return Fraction(self.p * other.q + self.q * other. p, self.q * other.q)

    def __iadd__(self, other):
        self.reduce()
        self = self + other
        return self

    def __sub__(self, other):
        self.reduce()
        if type(other) == int:
            return Fraction(self.p - self.q * other, self.q)
        elif type(other) == float:
            return self.p / self.q - other
        else:
            return Fraction(self.p * other.q - self.q * other. p, self.q * other.q)

    def __rsub__(self, other):
        self.reduce()
        if type(other) == int:
            return Fraction(self.q * other - self.p, self.q)
        elif type(other) == float:
            return other - self.p / self.q
        else:
            return Fraction(self.q * other. p - self.p * other.q, self.q * other.q)

    def __pos__(self):
        return Fraction(+self.p, +self.q)

    def __neg__(self):
        return Fraction(-self.p, self.q)

    def __abs__(self):
        if self.p < 0:
            return -self
        else:
            return self

    def __int__(self):
        return self.p // self.q

    def __float__(self):
        return self.p / self.q

    def __round__(self, digits = 0):
        return round(float(self), digits)

a, b, c, d = list(map(int, input().split()))
product = a * c
B1 = b * c
B2 = a * d
if B1 > B2:
    B1, B2 = B2, B1
ans = Fraction(B2 - B1, B2)
ans.reduce()
if ans != 0:
    print(abs(ans))
else:
    print("0/1")


import sys
from fractions import gcd
my_file = sys.stdin
#my_file = open("input.txt", "r")
line = [int(i) for i in my_file.readline().split()]
a, b, c, d = line[0], line[1], line[2], line[3]
if a/b < c/d:
    N = (b*c) - (a*d)
    D = b*c
else:
    N = (a*d)-(b*c)
    D = a*d

dec = gcd(N,D)

print(N//dec, end="/")
print(D//dec)

def gcd(a, b):
    while a % b != 0:
        a, b = b, a % b
    return b

l = input().split(' ')
a, b, c, d = int(l[0]), int(l[1]), int(l[2]), int(l[3])
if a * d > b * c:
    p = a * d - b * c
    q = a * d
else:
    p = b * c - a * d
    q = b * c
e = gcd(p, q)
p //= e
q //= e
print(str(p) + "/" + str(q))


def gcd(a,b):
    while a!=b:
        if a>b:
            a=a-b
        else :
            b=b-a
    print(m//a,'/',n//a,sep='')
a,b,c,d=map(int,input().split())
m=1
n=1

if a==b:
    if c==d :
        print(0,'/',1,sep='')
    else :
        if c>d:
            m=b*c-a*d
            n=c*b
            gcd(m,n)
        else :
            m=a*d-c*b
            n=a*d           
            gcd(m,n)
else:
    if c/d ==a/b:
        print(0,'/',1)
    else :
        if c/d>a/b:
            m=b*c-a*d
            n=c*b
            gcd(m,n)
        else :
            m=a*d-c*b
            n=a*d           
            gcd(m,n)        
            
        
                 


def gcd(a, b):
    if(a % b == 0):
        return b
    return gcd(b, a%b)

a, b, c, d = list(map(int, input().split()))

a *= c * d
b *= c * d

if a / c * d <= b:
    a = b - a / c * d
    g = gcd(a, b)
    print(str(int(a / g)) + '/' + str(int(b / g)))

else:
    b = a - b / d * c
    g = gcd(a, b)
    print(str(int(b / g)) + '/' + str(int(a / g)))


import fractions

a, b, c, d = list(map(int, input().split()))
p = max(a * d, b * c) - min(a * d, b * c)
q = max(a * d, b * c)
x = fractions.gcd(p, q)
print(str(p // x) + '/' + str(q // x))


from fractions import Fraction
while(1):
    try:
        a,b,c,d=list(map(int,input().split()))
        if a/b<c/d:
            ratio=0
        elif a/b==c/d:
            ratio=-1
        else:
            ratio=1
        if ratio==0:
            # ans=(bc-ad)/bc
            f=Fraction(b*c-a*d,b*c) 
            print("%s"%(f))            
        elif ratio==1:
             # ans=(ad-bc)/ad
            f=Fraction(a*d-b*c,a*d)
            print("%s"%(f))
        else:
            print("0/1")
    except EOFError:
        break
        
        


def gcd(a,b):
    if(a%b==0):return b;
    return gcd(b,a%b);
def solve(a,b,p,q):
    c=a*p/gcd(a,p);
    b1=b*c/a;
    q1=q*c/p;
    if(b1>=q1):
        if(b1==q1):
            print("0/1");
        else:
            d=gcd(b1-q1,b1);
            print(str(int((b1-q1)/d))+"/"+str(int(b1/d)));
        return True;
    return False;
def __starting_point():
    a,b,p,q=map(int,input().split());
    if(not solve(a,b,p,q)):
        solve(b,a,q,p);
__starting_point()

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# Author: Vitaly Pavlenko

import random
from fractions import gcd


def average(x):
    return sum(x) / len(x)


def shuffled(a):
    a = list(a)
    random.shuffle(a)
    return a


def read_ints():
    return [int(i) for i in input().split()]


def decrease(a):
    return [i - 1 for i in a]




def main():
    # nonlocal input
    # nonlocal print

    # fin = open('input.txt', 'r')
    # input = lambda: fin.readline().strip()
    # fout = open('output.txt', 'w')
    # _print = print
    # print = lambda *args, **kwargs: _print(*args, file=fout, **kwargs)

    a, b, c, d = read_ints()

    if a / b < c / d:
        a, b, c, d = b, a, d, c

    p, q = a * d - c * b, b * d
    s, t = p, a * d
    print(s // gcd(s, t), t // gcd(s, t), sep='/')

    # fout.close()


def __starting_point():
    # import doctest
    # doctest.testmod()
    main()
__starting_point()

from fractions import gcd

def Irreducible_Fraction(A,B):
    ''' Returns list of two integers representing the nominator and denominator of the Irreducible version of A/B '''
    x=gcd(A,B)
    return [A//x,B//x]
        



a,b,c,d=map(int,input().split())

#Movie Frame Ratio:
F=a/b

#Screen Ratio:
S=c/d



#There are three case:
(a/b < c/d)
(a/b == c/d)
(a/b > c/d)


#Case 1:
#Frame's ratio is larger than screen ratio (c/d > a/b)
#This means that if both the screen and the movie had the same vertical length,
#The movie's horizontal length will be bigger which is not desired !
#So in this case, we will stretch the movie until it is the same horizontal length as the screen,( c -> a )
#And the movie's vertical length would be smaller than the screen's vertical length.( d < b )
#Stretching factor = a/c
if(a/b <c/d):
    stretching_factor=a/c
    #To avoid decimals which may result into an error while computing the fraction
    #We will multiply both the the new area and te screen area by c
    New_horizontal=a
    New_vertical=a*d #The multiplied c apears in ommiting the division by c in the stretching factor
    New_Movie_Area=int(New_horizontal*New_vertical)
    Screen_Area=int(a*b*c) #The multiplied c appears
    Empty_Area=Screen_Area-New_Movie_Area
    desired_ratio=Irreducible_Fraction(Empty_Area,Screen_Area)
    nominator=desired_ratio[0]
    denominator=desired_ratio[1]
    print(nominator,end="/")
    print(denominator)


#Case 2:
#Frame's ratio is the same as the screen ratio (c/d == a/b)
#This means that we can stretch the movie till it is the same horizontal length as the screen,
#And the vertical length of the movie would be the same as the vertical length of the screen
#So The empty area will always be ZERO !


elif(a/b == c/d):
    print("0/1")


#Case 3:
#Opposite to Case 1
#Frame's ratio is smaller than screen ratio (c/d > a/b)
#This means that the stretching process will end when the vertical length is the same for the screen and the frame
#While the horizontal length of the screen is bigger
#Stretching facto = b/d
else:
    stretching_factor=b/d
    #To_avoid decimals, the same as case 1 was done !
    New_vertical=b
    New_horizontal=(b)*c
    New_Movie_Area=int(New_horizontal*New_vertical)
    Screen_Area=int(a*b*d)
    Empty_Area=Screen_Area-New_Movie_Area
    desired_ratio=Irreducible_Fraction(Empty_Area,Screen_Area)
    nominator=desired_ratio[0]
    denominator=desired_ratio[1]
    print(nominator,end="/")
    print(denominator)


from fractions import Fraction

a, b, c, d = map(int, input().split())

if a / c <= b / d:
  res = Fraction(b * c - a * d, b * c)
else:
  res = Fraction(a * d - b * c, a * d)

print("{0}/{1}".format(res.numerator, res.denominator))

def check(t):
    if x==int(x):return True
    else:return False

def gcd(x,y):
    if x%y==0 :return y
    else: return gcd(y,x%y)
a,b,c,d=list(map(int,input().split()))
a*=max(c,d)
b*=max(c,d)
r=c/d
if a/b<r:
   x=b*c-a*d
   b=b*c
  
   

   u=gcd(x,b)
   p=str(int(x/u))+'/'+str(int(b/u))
   print(p)

else:
    x=a*d-c*b
    a=a*d
    

    u=gcd(x,a)
    p=str(int(x/u))+'/'+str(int(a/u))
    print(p)


def gcd(x, y):
    while x!=0:
        x,y = y%x,x
    return y

def main():
    a,b,c,d = [int(item) for item in input().split()]
    k1 = float(a)/float(b)
    k2 = float(c)/float(d)
    p = 0
    q = 1
    g = 0

    if k1>k2:
        q = a*d
        p = q-b*c
        g = gcd(p,q)
    elif k1<k2:
        q = b*c
        p = q - a*d
        g = gcd(p, q)

    if g>1:
        p = int(p / g)
        q = int(q / g)

    print('{}/{}'.format(p, q))

main()


def gcd(a, b):
    c = a % b
    return gcd(b, c) if c else b

a, b, c, d = map(int, input().split())
if a * d < b * c: a, b, c, d = b, a, d, c
p = a * d - b * c
q = d * a
t = gcd(p, q)

print(str(p // t) + '/' + str(q // t))

from sys import stdin
from fractions import Fraction

(a,b,c,d) = map(int, input().split());

cd = Fraction(c, d)
ab = Fraction(a, b)
f1 = Fraction(1, 1)

if cd < ab:
	print(f1 - Fraction(c * b, a * d))
elif cd > ab:
	print(f1 - Fraction(a * d, c * b))
else:
	print("0/1")