Vector Willman and Array Bolt are the two most famous athletes of Byteforces. They are going to compete in a race with a distance of L meters today.

 [Image] 

Willman and Bolt have exactly the same speed, so when they compete the result is always a tie. That is a problem for the organizers because they want a winner. 

While watching previous races the organizers have noticed that Willman can perform only steps of length equal to w meters, and Bolt can perform only steps of length equal to b meters. Organizers decided to slightly change the rules of the race. Now, at the end of the racetrack there will be an abyss, and the winner will be declared the athlete, who manages to run farther from the starting point of the the racetrack (which is not the subject to change by any of the athletes). 

Note that none of the athletes can run infinitely far, as they both will at some moment of time face the point, such that only one step further will cause them to fall in the abyss. In other words, the athlete will not fall into the abyss if the total length of all his steps will be less or equal to the chosen distance L.

Since the organizers are very fair, the are going to set the length of the racetrack as an integer chosen randomly and uniformly in range from 1 to t (both are included). What is the probability that Willman and Bolt tie again today?


-----Input-----

The first line of the input contains three integers t, w and b (1 ≤ t, w, b ≤ 5·10^18) — the maximum possible length of the racetrack, the length of Willman's steps and the length of Bolt's steps respectively.


-----Output-----

Print the answer to the problem as an irreducible fraction [Image]. Follow the format of the samples output.

The fraction [Image] (p and q are integers, and both p ≥ 0 and q > 0 holds) is called irreducible, if there is no such integer d > 1, that both p and q are divisible by d.


-----Examples-----
Input
10 3 2

Output
3/10

Input
7 1 2

Output
3/7



-----Note-----

In the first sample Willman and Bolt will tie in case 1, 6 or 7 are chosen as the length of the racetrack.

Difficulty: interview

Starter code:

Solutions:
from fractions import gcd

t,w,b = map(int,input().split())
per = w*b//gcd(w,b)
can = (t//per+1)*min(w,b)-1
if t%per<min(w,b):
    can-=min(w,b)
    can+=t%per+1
g = gcd(can,t)
can//=g
t//=g
print(str(can)+"/"+str(t))


from fractions import gcd
a, b, c = list(map(int, input().split(' ')))
l = b * c // gcd(b, c)
b, c = min(b, c), max(b, c)

## 0...b-1 ##
mults = a // l
rem = a - l * mults + 1

num = mults * (b)
rem = min(b, rem)
x = num + rem - 1

g = gcd(x, a)
print(str(x//g) + '/' + str(a//g))


def gcd(a,b):
    if b == 0:
        return a
    return gcd(b,a%b)
def lcm(a,b):
    return (a*b)//gcd(a,b)
t,w,b = map(int,input().split())
lc = lcm(w,b)
mn = 0
if w > b:
    mn = b
else:
    mn = w
ans = mn*(t//lc+1)-1
val = (t//lc)*lc + mn - 1
if t - val < 0:
    ans += t-val
g = gcd(ans,t)
ans //= g
t //= g
print(ans,end="")
print("/",end="")
print(t)

from fractions import gcd

t, w, b = map(int, input().split())
mn = min(w, b)
nk = w // gcd(w, b) * b
first = (t  + 1) // nk * mn - 1
e = first + min(mn, (t + 1) % nk)
nd = gcd(e, t)
print(e // nd, "/", t // nd, sep = "")


from fractions import gcd

t, w, b = map(int, input().split())
nok = w * b // gcd(w, b)
ans = (t // nok) * min(w, b) + min(w - 1, b - 1, t % nok)
ans, t = ans // gcd(ans, t), t // gcd(ans, t)
print (ans, t, sep = "/")


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

inp = [int(i) for i in input().split(' ')]
t = inp[0]
w = inp[1]
b = inp[2]
nok = w * b // gcd(w, b)
ans = t // nok * min(w, b) - 1
tmp = t % nok
ans += min(tmp + 1, min(w, b))
g = gcd(ans, t)
print(ans // g, t // g, sep='/')


import math
import sys

def Cmmdc(a, b):
	r = 0
	while b > 0:
		r = a % b
		a = b
		b = r
	return a

lst = list(map(int, input().split()))

t = auxT = lst[0]
n = lst[1]
m = lst[2]

if n > m:
	aux = n
	n = m
	m = aux

cmmdc = Cmmdc(n, m)
cmmmc = n * m // cmmdc

fav = (t // cmmmc) * n
t = t % cmmmc
fav += min(n - 1, t)

t = auxT
c = Cmmdc(fav, t)
fav //= c
t //= c

print(str(fav) + "/" + str(t) + "\n")


import sys
from math import *
sys.setrecursionlimit(100000000)

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

def ppcm(a,b):
    if (a==0) or (b==0):
        return 0
    else:
        return (a*b)//pgcd(a,b)

t,w,b=map(int,input().split())
a=ppcm(w,b)
x=min(w,b)
y=t//a
v=x*y+min(x,t%a+1)-1

w=pgcd(v,t)
if v==0:print("0/1")
else:
	print(v//w,end="")
	print("/",end="")
	print(t//w)

t, w, b = list(map(int, input().split()))


def NOK(a, b):
    m = a*b
    while a != 0 and b != 0:
        if a > b:
            a %= b
        else:
            b %= a
    return m // (a+b)

def NOD(a, b):
    while a != 0 and b != 0:
        if a > b:
            a %= b
        else:
            b %= a
    return (a+b)


if w == 1 or b == 1:
    res = t // max (w, b)
else:
    k = NOK(w, b)
    ost = max(0, min(w, b) - 1 - t % k)
    res = (t // k + 1) * min(w,b) - 1 - ost

m = NOD(t, res)

print(str(res // m) + '/' + str(t // m))


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

def lcm(a,b):
    return a//gcd(a,b)*b

t,w,b = map(int,input().split())
p = min(w,b)
lc = lcm(w,b)
kol = t//lc
ret = kol*p
zv = t%lc
ret += min(zv, p-1)
g = gcd(ret, t)
ret//=g
t//=g
print(ret,'/',t,sep="")


l, n, m = map(int, input().split())
from fractions import gcd
lcm = lambda x, y: x // gcd(x,y) * y
u = lcm(n,m)
v = min(n,m)
a = (l//u) * v + min(v, l%u+1) - 1    
print(a//gcd(a,l),'/',l//gcd(a,l),sep='')



#!/usr/bin/env python3
import math
t, a, b = list(map(int,input().split()))
l= a * b // math.gcd(a,b)
p = (t // l) * min(a,b) + min(t % l, min(a,b) - 1)
q = t
r = math.gcd(p, q)
print('{}/{}'.format(p//r, q//r))


#!/usr/bin/env python3

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

def main():
    L, a, b = list(map(int, input().split()))
    c = a // gcd(a, b) * b
    m = min(a, b)
    if c <= m:
        print('1/1')
    else:
        p = L // c * m
        p += min(L % c, m - 1)
        g = gcd(p, L)
        print('%d/%d' % (p // g, L // g))

main()

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


t, w, b = map(int, input().split())
g = w * b // gcd(w, b)
res = 0
minh = min(w, b)
res += (t // g + 1) * minh - 1
correct = (t // g) * g + minh - 1
if (correct > t) :
	res -= correct - t
y = gcd(res, t)
print(res // y, "/", t // y, sep = "")

from fractions import gcd

t, a, b = map(int, input().split())

if a > b:
    a, b = b, a

lcm = a * b // gcd(a, b)
cnt = t // lcm
lst = lcm * cnt

ans = cnt * a + a - 1 

if lst + a > t + 1:
    ans -= lst + a - t - 1

num = ans
den = t

g = gcd(num, den)
num //= g
den //= g

print(num, den, sep='/')



from fractions import gcd

def lcm(a, b):
    return (a * b) // gcd(a, b)


def __starting_point():
    t, w, b = list(map(int, input().split()))

    l = lcm(w, b)
    m = min(w, b)

    count = t // l
    result = count * m
    result += (m - 1) # 1 to m-1

    diff = max(count*l + m - t - 1, 0)
    result -= diff

    g = gcd(result, t)

    print('{}/{}'.format(result//g, t//g))



__starting_point()

t, w, b = map(int, input().split())

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

def lcm(a, b):
    return a // gcd(a, b) * b

add = min(w, b) - 1
l = lcm(w, b)

cnt = t // l

ans = add + cnt + cnt * add
ans -= max(0, l * cnt + add - t)

g = gcd(ans, t)
if g != 0:
    ans //= g
    t //= g

print(ans, end='')
print('/', end='')
print(t)


3

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

x = input()
x = [int(_) for _ in x.split()]
# print(x)

t = x[0]
w = x[1]
b = x[2]

x = gcd(w, b)
k = min(w,b)

lcm = (w*b)//x

alpha = t//lcm

ans = alpha*(k)

l = alpha*lcm + k- 1

if l <= t :
	ans += k
else:
	ans += t - (alpha*lcm) + 1

ans -= 1

gg = gcd(ans, t)
ans = ans//gg
t = t//gg

print(str(ans)+"/"+str(t))

# your code goes here

[t, w, b] = [int(x) for x in input().split()]

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

d = w*b // gcd(w, b)
m = min(w, b)

dint = t // d

count = m * dint

count += m - 1
    
d = dint * d + m - 1

if (d > t):
    count -= (d - t)

gcdtcnt = gcd(t, count)
t = t // gcdtcnt
count = count // gcdtcnt

print(count, '/', t, sep='')

#! /usr/bin/python

from fractions import gcd

t, w, b = list(map(int, input().split()))

if w == b:
    print('1/1')
else:
    wb = w * b // gcd(w, b)
    m = min(w, b)
    n = t // wb * m - 1 + min(t % wb + 1, m)
    g = gcd(n, t)
    print("%d/%d" % (n // g, t // g))


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

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

def lcm(a, b):
    return a // gcd(a, b) * b

l = lcm(a, b)
last = t // l * l
ans = t // l * min(a, b)
ans += min(a, b, t - last + 1)
ans -= 1
g = gcd(ans, t)
ans //= g
t //= g
ans = str(ans) + '/' + str(t)
print(ans)



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


t, w, b = [int(i) for i in input().split()]
mi = min(w, b)
lcm = w * b // gcd(w, b)

p = t // lcm * mi + min(mi - 1, t % lcm)
q = t
print("{0}/{1}".format(p // gcd(p, q), q // gcd(p, q)))

t, w, b = list(map(int, input().split()))

def gcd(x, y):
    while (x != 0 and y != 0):
        if (x < y):
            x, y = y, x
        x %= y
    return x + y;

ans = (t // (w * b // gcd(w, b)) - 1) * min(w, b)
ans += min(t - (t // (w * b // gcd(w, b))) * (w * b // gcd(w, b)) + 1, min(b, w))
ans += min(w, b) - 1;
print(ans // gcd(ans, t), end = "/")
print(t // gcd(ans, t))

from fractions import gcd
s = list(map(int, input().split()))
t = s[0]
a = s[1]
b = s[2]
nod = gcd(a, b)
nok = a * b // nod
ans = t // nok * min(a, b) + min(a, b) - 1
ans -= max(0, ((t // nok) * nok) + min(a, b) - 1 - t)
gc = gcd(ans, t)
ans //= gc
t //= gc
print(str(int(ans)) + '/' + str(int(t)))

from fractions import gcd
t, w, b = list(map(int, input().split()))
if w > b:
    w, b = b, w
l = w * b // gcd(w, b)
c = t // l
ans = c * w + (min((t + 1) - l * c, w)) - 1
g = gcd(ans, t)
print('{}/{}'.format(ans // g, t // g))