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.

Source: codeforces | Difficulty: MEDIUM_HARD
Tags: Mathematics


Solutions:
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
s = input()
(t, w, b) = map(int, s.split())
lcm = w * b // gcd(w, b)
if w > b:
	c = w
	w = b
	b = c
cnt = t // lcm
if cnt > 0:
	good = max(0, cnt * w - 1) + min(w, t % lcm + 1)
else:
	good = min(w - 1, t)
print(str(good // gcd(good, t)) + '/' + str(t // gcd(good, t)))


import math
(t, a, b) = 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))


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

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

def main():
	l = input().split()
	t = int(l[0])
	w = int(l[1])
	b = int(l[2])
	ans = min(min(w, b) - 1, t - t // lcm(w, b) * lcm(w, b)) + t // lcm(w, b) * min(w, b)
	g = gcd(ans, t)
	ans = ans // g
	t = t // g
	if ans > t:
		(ans, t) = (1, 1)
	an = str(int(ans)) + '/' + str(int(t))
	print(an)
main()


def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)
ls = list(map(int, input().split()))
t = ls[0]
w = ls[1]
b = ls[2]
tmp = 0
if w < b:
	tmp = w
	w = b
	b = tmp
x = int(w * b // gcd(w, b))
cnt = int(t // x)
r = int(t - cnt * x)
res = int(cnt * b + min(r, b - 1))
print('{:d}/{:d}'.format(int(res // gcd(res, t)), int(t // gcd(t, res))))


import fractions
stra = input()
lista = stra.split()
n = int(lista[0])
a = int(lista[1])
b = int(lista[2])
gab = fractions.gcd(a, b)
l = a // gab * b
ans = n // l * min(a, b)
ans += min(n % l, min(a, b) - 1)
g = fractions.gcd(ans, n)
ans //= g
n //= g
print(str(ans) + '/' + str(n))


import sys, math

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
(b, w, t) = [int(x) for x in input().split()]
g = gcd(t, w)
s = min(t, w) - 1
nok = t * w // g
delta = min(t, w)
s += (b // nok - 1) * delta
s += min(b - b // nok * nok + 1, delta)
ans1 = s
ans2 = b
ans1 //= gcd(s, b)
ans2 //= gcd(s, b)
print(ans1, '/', ans2, sep='')


from fractions import gcd
(t, w, b) = map(int, input().split())
p = int(t // (w * b // gcd(w, b))) * min(w, b) + min(w - 1, b - 1, t % (w * b // gcd(w, b)))
print(str(int(p // gcd(p, t))) + '/' + str(int(t // gcd(p, t))))


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):
	if a == 0:
		return b
	return gcd(b % a, a)
(t, w, b) = map(int, input().split())
x = w * b // gcd(w, b)
ans = t // x * min(w, b) + min(w, b) - 1
if t // x * x + min(w, b) - 1 > t:
	ans -= t // x * x + min(w, b) - 1 - t
y = gcd(ans, t)
ans = ans // y
t = t // y
print(str(ans) + '/' + str(t))


import sys

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

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

def min(a, b):
	if a < b:
		return a
	return b

def max(a, b):
	if a < b:
		return b
	return a
p = sys.stdin.readline().split()
t = int(p[0])
w = int(p[1])
b = int(p[2])
m = min(w, b)
M = lcm(w, b)
z = int((t // M + 1) * m - 1 - max(m - 1 - t % M, 0))
y = gcd(z, t)
z = z // y
t = t // y
print('{:d}/{:d}'.format(z, t))


import sys
from math import gcd, sqrt, ceil, log2
from collections import defaultdict, Counter, deque
from bisect import bisect_left, bisect_right
import math
sys.setrecursionlimit(2 * 10 ** 5 + 10)
import heapq
from itertools import permutations
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192
aa = 'abcdefghijklmnopqrstuvwxyz'

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def get_sum(bit, i):
	s = 0
	i += 1
	while i > 0:
		s += bit[i]
		i -= i & -i
	return s

def update(bit, n, i, v):
	i += 1
	while i <= n:
		bit[i] += v
		i += i & -i

def modInverse(b, m):
	g = math.gcd(b, m)
	if g != 1:
		return -1
	else:
		return pow(b, m - 2, m)

def primeFactors(n):
	sa = []
	while n % 2 == 0:
		sa.append(2)
		n = n // 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			sa.append(i)
			n = n // i
	if n > 2:
		sa.append(n)
	return sa

def seive(n):
	pri = [True] * (n + 1)
	p = 2
	while p * p <= n:
		if pri[p] == True:
			for i in range(p * p, n + 1, p):
				pri[i] = False
		p += 1
	return pri

def check_prim(n):
	if n < 0:
		return False
	for i in range(2, int(sqrt(n)) + 1):
		if n % i == 0:
			return False
	return True

def getZarr(string, z):
	n = len(string)
	(l, r, k) = (0, 0, 0)
	for i in range(1, n):
		if i > r:
			(l, r) = (i, i)
			while r < n and string[r - l] == string[r]:
				r += 1
			z[i] = r - l
			r -= 1
		else:
			k = i - l
			if z[k] < r - i + 1:
				z[i] = z[k]
			else:
				l = i
				while r < n and string[r - l] == string[r]:
					r += 1
				z[i] = r - l
				r -= 1

def search(text, pattern):
	concat = pattern + '$' + text
	l = len(concat)
	z = [0] * l
	getZarr(concat, z)
	ha = []
	for i in range(l):
		if z[i] == len(pattern):
			ha.append(i - len(pattern) - 1)
	return ha

def mergeIntervals(arr):
	arr.sort(key=lambda x: x[0])
	m = []
	s = -10000
	max = -100000
	for i in range(len(arr)):
		a = arr[i]
		if a[0] > max:
			if i != 0:
				m.append([s, max])
			max = a[1]
			s = a[0]
		elif a[1] >= max:
			max = a[1]
	if max != -100000 and [s, max] not in m:
		m.append([s, max])
	return m

class SortedList:

	def __init__(self, iterable=[], _load=200):
		values = sorted(iterable)
		self._len = _len = len(values)
		self._load = _load
		self._lists = _lists = [values[i:i + _load] for i in range(0, _len, _load)]
		self._list_lens = [len(_list) for _list in _lists]
		self._mins = [_list[0] for _list in _lists]
		self._fen_tree = []
		self._rebuild = True

	def _fen_build(self):
		self._fen_tree[:] = self._list_lens
		_fen_tree = self._fen_tree
		for i in range(len(_fen_tree)):
			if i | i + 1 < len(_fen_tree):
				_fen_tree[i | i + 1] += _fen_tree[i]
		self._rebuild = False

	def _fen_update(self, index, value):
		if not self._rebuild:
			_fen_tree = self._fen_tree
			while index < len(_fen_tree):
				_fen_tree[index] += value
				index |= index + 1

	def _fen_query(self, end):
		if self._rebuild:
			self._fen_build()
		_fen_tree = self._fen_tree
		x = 0
		while end:
			x += _fen_tree[end - 1]
			end &= end - 1
		return x

	def _fen_findkth(self, k):
		_list_lens = self._list_lens
		if k < _list_lens[0]:
			return (0, k)
		if k >= self._len - _list_lens[-1]:
			return (len(_list_lens) - 1, k + _list_lens[-1] - self._len)
		if self._rebuild:
			self._fen_build()
		_fen_tree = self._fen_tree
		idx = -1
		for d in reversed(range(len(_fen_tree).bit_length())):
			right_idx = idx + (1 << d)
			if right_idx < len(_fen_tree) and k >= _fen_tree[right_idx]:
				idx = right_idx
				k -= _fen_tree[idx]
		return (idx + 1, k)

	def _delete(self, pos, idx):
		_lists = self._lists
		_mins = self._mins
		_list_lens = self._list_lens
		self._len -= 1
		self._fen_update(pos, -1)
		del _lists[pos][idx]
		_list_lens[pos] -= 1
		if _list_lens[pos]:
			_mins[pos] = _lists[pos][0]
		else:
			del _lists[pos]
			del _list_lens[pos]
			del _mins[pos]
			self._rebuild = True

	def _loc_left(self, value):
		if not self._len:
			return (0, 0)
		_lists = self._lists
		_mins = self._mins
		(lo, pos) = (-1, len(_lists) - 1)
		while lo + 1 < pos:
			mi = lo + pos >> 1
			if value <= _mins[mi]:
				pos = mi
			else:
				lo = mi
		if pos and value <= _lists[pos - 1][-1]:
			pos -= 1
		_list = _lists[pos]
		(lo, idx) = (-1, len(_list))
		while lo + 1 < idx:
			mi = lo + idx >> 1
			if value <= _list[mi]:
				idx = mi
			else:
				lo = mi
		return (pos, idx)

	def _loc_right(self, value):
		if not self._len:
			return (0, 0)
		_lists = self._lists
		_mins = self._mins
		(pos, hi) = (0, len(_lists))
		while pos + 1 < hi:
			mi = pos + hi >> 1
			if value < _mins[mi]:
				hi = mi
			else:
				pos = mi
		_list = _lists[pos]
		(lo, idx) = (-1, len(_list))
		while lo + 1 < idx:
			mi = lo + idx >> 1
			if value < _list[mi]:
				idx = mi
			else:
				lo = mi
		return (pos, idx)

	def add(self, value):
		_load = self._load
		_lists = self._lists
		_mins = self._mins
		_list_lens = self._list_lens
		self._len += 1
		if _lists:
			(pos, idx) = self._loc_right(value)
			self._fen_update(pos, 1)
			_list = _lists[pos]
			_list.insert(idx, value)
			_list_lens[pos] += 1
			_mins[pos] = _list[0]
			if _load + _load < len(_list):
				_lists.insert(pos + 1, _list[_load:])
				_list_lens.insert(pos + 1, len(_list) - _load)
				_mins.insert(pos + 1, _list[_load])
				_list_lens[pos] = _load
				del _list[_load:]
				self._rebuild = True
		else:
			_lists.append([value])
			_mins.append(value)
			_list_lens.append(1)
			self._rebuild = True

	def discard(self, value):
		_lists = self._lists
		if _lists:
			(pos, idx) = self._loc_right(value)
			if idx and _lists[pos][idx - 1] == value:
				self._delete(pos, idx - 1)

	def remove(self, value):
		_len = self._len
		self.discard(value)
		if _len == self._len:
			raise ValueError('{0!r} not in list'.format(value))

	def pop(self, index=-1):
		(pos, idx) = self._fen_findkth(self._len + index if index < 0 else index)
		value = self._lists[pos][idx]
		self._delete(pos, idx)
		return value

	def bisect_left(self, value):
		(pos, idx) = self._loc_left(value)
		return self._fen_query(pos) + idx

	def bisect_right(self, value):
		(pos, idx) = self._loc_right(value)
		return self._fen_query(pos) + idx

	def count(self, value):
		return self.bisect_right(value) - self.bisect_left(value)

	def __len__(self):
		return self._len

	def __getitem__(self, index):
		(pos, idx) = self._fen_findkth(self._len + index if index < 0 else index)
		return self._lists[pos][idx]

	def __delitem__(self, index):
		(pos, idx) = self._fen_findkth(self._len + index if index < 0 else index)
		self._delete(pos, idx)

	def __contains__(self, value):
		_lists = self._lists
		if _lists:
			(pos, idx) = self._loc_left(value)
			return idx < len(_lists[pos]) and _lists[pos][idx] == value
		return False

	def __iter__(self):
		return (value for _list in self._lists for value in _list)

	def __reversed__(self):
		return (value for _list in reversed(self._lists) for value in reversed(_list))

	def __repr__(self):
		return 'SortedList({0})'.format(list(self))

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def sol(n):
	seti = set()
	for i in range(1, int(sqrt(n)) + 1):
		if n % i == 0:
			seti.add(n // i)
			seti.add(i)
	return seti

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

def moore_voting(l):
	count1 = 0
	count2 = 0
	first = 10 ** 18
	second = 10 ** 18
	n = len(l)
	for i in range(n):
		if l[i] == first:
			count1 += 1
		elif l[i] == second:
			count2 += 1
		elif count1 == 0:
			count1 += 1
			first = l[i]
		elif count2 == 0:
			count2 += 1
			second = l[i]
		else:
			count1 -= 1
			count2 -= 1
	for i in range(n):
		if l[i] == first:
			count1 += 1
		elif l[i] == second:
			count2 += 1
	if count1 > n // 3:
		return first
	if count2 > n // 3:
		return second
	return -1

def find_parent(u, parent):
	if u != parent[u]:
		parent[u] = find_parent(parent[u], parent)
	return parent[u]

def dis_union(n, e):
	par = [i for i in range(n + 1)]
	rank = [1] * (n + 1)
	for (a, b) in e:
		(z1, z2) = (find_parent(a, par), find_parent(b, par))
		if rank[z1] > rank[z2]:
			(z1, z2) = (z2, z1)
		if z1 != z2:
			par[z1] = z2
			rank[z2] += rank[z1]
		else:
			return (a, b)

def dijkstra(n, tot, hash):
	hea = [[0, n]]
	dis = [10 ** 18] * (tot + 1)
	dis[n] = 0
	boo = defaultdict(bool)
	check = defaultdict(int)
	while hea:
		(a, b) = heapq.heappop(hea)
		if boo[b]:
			continue
		boo[b] = True
		for (i, w) in hash[b]:
			if b == 1:
				c = 0
				if (1, i, w) in nodes:
					c = nodes[1, i, w]
					del nodes[1, i, w]
				if dis[b] + w < dis[i]:
					dis[i] = dis[b] + w
					check[i] = c
				elif dis[b] + w == dis[i] and c == 0:
					dis[i] = dis[b] + w
					check[i] = c
			elif dis[b] + w <= dis[i]:
				dis[i] = dis[b] + w
				check[i] = check[b]
			heapq.heappush(hea, [dis[i], i])
	return check

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res *= x
		x = x * x
		y = y >> 1
	return res
import sys
from math import ceil, log2
INT_MAX = sys.maxsize

def minVal(x, y):
	return x if x < y else y

def getMid(s, e):
	return s + (e - s) // 2

def RMQUtil(st, ss, se, qs, qe, index):
	if qs <= ss and qe >= se:
		return st[index]
	if se < qs or ss > qe:
		return INT_MAX
	mid = getMid(ss, se)
	return minVal(RMQUtil(st, ss, mid, qs, qe, 2 * index + 1), RMQUtil(st, mid + 1, se, qs, qe, 2 * index + 2))

def RMQ(st, n, qs, qe):
	if qs < 0 or qe > n - 1 or qs > qe:
		print('Invalid Input')
		return -1
	return RMQUtil(st, 0, n - 1, qs, qe, 0)

def constructSTUtil(arr, ss, se, st, si):
	if ss == se:
		st[si] = arr[ss]
		return arr[ss]
	mid = getMid(ss, se)
	st[si] = minVal(constructSTUtil(arr, ss, mid, st, si * 2 + 1), constructSTUtil(arr, mid + 1, se, st, si * 2 + 2))
	return st[si]

def constructST(arr, n):
	x = int(ceil(log2(n)))
	max_size = 2 * int(2 ** x) - 1
	st = [0] * max_size
	constructSTUtil(arr, 0, n - 1, st, 0)
	return st
(t, w, b) = map(int, input().split())
if w == b:
	print('1/1')
	exit()
(w, b) = (min(w, b), max(w, b))
den = t
z = lcm(w, b)
k = t // z
num = k + k * (w - 1)
if k * z + w > t:
	num += t - k * z
else:
	num += w - 1
g = gcd(num, den)
a = str(num // g) + '/' + str(den // g)
print(a)


import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
ALPHA = 'abcdefghijklmnopqrstuvwxyz'
M = 10 ** 9 + 7
EPS = 1e-06

def value():
	return tuple(map(int, input().split()))

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

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
(t, w, b) = value()
(a, b) = sorted((w, b))
lcm = a * b // gcd(a, b)
sections = t // lcm
ans = sections * a
ans += min(a - 1, t % lcm)
ans = Fraction(ans, t)
print(ans.numerator, '/', ans.denominator, sep='')


import math

def euclid_algorithm(a, b):
	(t1, t2) = (abs(a), abs(b))
	(x1, y1, x2, y2) = (int(math.copysign(1, a)), 0, 0, int(math.copysign(1, b)))
	if t1 < t2:
		(t1, t2) = (t2, t1)
		(x1, y1, x2, y2) = (x2, y2, x1, y1)
	while t2 > 0:
		if x1 * a + y1 * b != t1:
			print('inshalla')
		k = int(t1 // t2)
		(t1, t2) = (t2, t1 % t2)
		(x1, y1, x2, y2) = (x2, y2, x1 - k * x2, y1 - k * y2)
	return (t1, x1, y1)

def opposite_element(x, p):
	(gcd, k, l) = euclid_algorithm(x, p)
	if gcd != 1:
		return -1
	return k % p
(t, w, b) = [int(x) for x in input().split()]
gcd = euclid_algorithm(w, b)[0]
lcm = w * b // gcd
ans = (t + 1) // lcm * min(w, b) + min((t + 1) % lcm, w, b) - 1
new_gcd = euclid_algorithm(ans, t)[0]
print('{0}/{1}'.format(ans // new_gcd, t // new_gcd))


import os
import sys
import math
from io import BytesIO, IOBase
from fractions import Fraction
from collections import defaultdict
from itertools import permutations
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
(t, w, b) = map(int, input().split())
g = math.gcd(w, b)
a = w // g * b
cnt = t // a
cnt = cnt * min(w, b) + min(min(w, b) - 1, t - a * cnt)
g = math.gcd(cnt, t)
print('%d/%d' % (cnt // g, t // g))


def GCD(a, b):
	if b == 0:
		return a
	return GCD(b, a % b)
(t, w, b) = map(int, input().split())
var = w * b
gc = GCD(w, b)
X = var // gc
lim = min({t + 1, w, b}) - 1
x = (t - lim) // X + 1
sum = (lim + 1) * x - 1
left = x * X
sum += max(0, t - left + 1)
div = GCD(sum, t)
print('{p}/{q}'.format(p=sum // div, q=t // div))


def gcd(a, b):
	while a != 0 and b != 0:
		if a > b:
			a = a % b
		else:
			b = b % a
	return a + b
(t, a, b) = map(int, input().split())
pnk = min(a, b)
nod = gcd(a, b)
nok = a * b // nod
ans = pnk * (t // nok)
ans += min(pnk, t % nok + 1)
ans -= 1
nd = gcd(ans, t)
ans = ans // nd
t = t // nd
print(str(ans) + '/' + str(t))


import math
(T, W, B) = map(int, input().split())
space = min(W, B)
arong = W // math.gcd(W, B) * B
add = 0
add += T // arong * space
add += min(space, T % arong + 1)
add -= 1
if add == 0:
	print('0/1')
else:
	v = math.gcd(T, add)
	T //= v
	add //= v
	print(add, '/', T, sep='')


from fractions import gcd
(t, w, b) = map(int, input().split())
lcm = w * b // gcd(w, b)
cnt = t // lcm
a = min(w, b) * cnt + min(t % lcm, min(w, b) - 1)
(zi, mu) = (a // gcd(a, t), t // gcd(a, t))
print(str(zi) + '/' + str(mu))


def nok(p, q):
	(p1, q1) = (min(p, q), max(p, q))
	d = p1
	while q1 % p1 > 0:
		d = q1 % p1
		(q1, p1) = (p1, d)
	return p * q // d

def rez(p, q):
	if p == 0:
		return '0/1'
	(p1, q1) = (min(p, q), max(p, q))
	d = p1
	while q1 % p1 > 0:
		d = q1 % p1
		(q1, p1) = (p1, d)
	q1 = q // d
	p1 = p // d
	return str(p1) + '/' + str(q1)
s = input()
a = s.split(' ')
(t, w, b) = (int(a[0]), int(a[1]), int(a[2]))
m = min(w, b) - 1
n = t // nok(w, b)
d = t % nok(w, b)
p = m + n + (n - 1) * m + min(m, d)
print(rez(p, t))


import sys
import fractions
for line in sys.stdin:
	li = line.split()
	t = int(li[0])
	w = int(li[1])
	b = int(li[2])
	mi = min(w, b)
	Gcd = fractions.gcd(w, b)
	Lcm = w * b // Gcd
	if Lcm > t:
		ans = min(t, w - 1, b - 1)
	else:
		cnt = t // Lcm
		res = t - cnt * Lcm
		ans = cnt * min(w, b) + min(res, w - 1, b - 1)
	Gcd = fractions.gcd(ans, t)
	print('%s/%s' % (ans // Gcd, t // Gcd))


from fractions import gcd
(t, w, b) = map(int, input().split())
if w == b:
	print('1/1')
	exit(0)
lcm = w // gcd(w, b) * b
a = min(w, b)
ans = t // lcm * a + min(a - 1, t % lcm)
ans = int(ans)
o = gcd(t, ans)
print('%d/%d' % (ans // o, t // o))


(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='')


def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)
(n, a, b) = map(int, input().split())
g = gcd(a, b)
lcm = a * b // gcd(a, b)
mul = n // lcm
extra = mul * (min(a, b) - 1)
last = mul * lcm
left = n - last
total = mul + extra + min(min(a, b) - 1, left)
total = min(total, n)
g = gcd(total, n)
total = total // g
n = n // g
print(str(total) + '/' + str(n))


import sys
sys.setrecursionlimit(20000)

def gcd(a, b):
	if b == 0:
		return a
	else:
		if b is 0:
			sys.exit(0)
		return gcd(b, a % b)

def lcm(a, b):
	if gcd(a, b) == 0:
		sys.exit(0)
	return a * b // gcd(a, b)
(t, w, b) = tuple((int(i) for i in input().strip().split()))[:3]
if b <= w:
	(w, b) = (b, w)
lc = lcm(w, b)
if lc is 0:
	sys.exit(0)
fits = t // lc
sol = 0
if w <= t:
	sol += w - 1
if fits > 0:
	sol += w * (fits - 1)
	last = fits * lc
	if last + w - 1 <= t:
		sol += w
	elif last <= t:
		sol += t - last + 1
if sol == 0:
	if w > t:
		sol = t
	else:
		sol = 0
up = sol
down = t
g = gcd(up, down)
if g is 0:
	sys.exit(0)
up //= g
down //= g
print('{}/{}'.format(up, down))


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

def g(x, y):
	return g(y % x, x) if x else y
k = w * b // g(w, b)
a = min(w, b)
s = t // k * a + min(a - 1, t % k)
d = g(t, s)
print(str(s // d) + '/' + str(t // d))


from fractions import gcd
(t, a, b) = map(int, input().split())
L = a * b // gcd(a, b)
if a > b:
	(a, b) = (b, a)
ans = a * (t // L)
ans += min(a, t % L + 1)
ans -= 1
g = gcd(ans, t)
print(str(ans // g) + '/' + str(t // g))


from fractions import gcd, Fraction
(t, w, b) = map(int, input().split())
if w > b:
	(w, b) = (b, w)
g = gcd(w, b)
x = w * b // g
(division, remainder) = (t // x, t % x)
a = division * w + min(remainder, w - 1)
g = gcd(t, a)
print(a // g, '/', t // g, sep='')


[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='')


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))


import sys
from math import gcd
(t, w, b) = map(int, input().split())
c = w * b // gcd(w, b)
num = t // c - 1
ans = max(0, num) * min(b, w)
if num != -1:
	ans += min(t - c * (num + 1) + 1, b, w)
if num == -1:
	ans += min(t - c * (num + 1), b - 1, w - 1)
else:
	ans += min(b - 1, w - 1)
d = gcd(ans, t)
ans //= d
t //= d
print(str(ans) + '/' + str(t))


from fractions import gcd
(t, w, b) = map(int, input().split())
lcm = w * (b // gcd(w, b))
lwb = t // lcm
res = min(min(w, b) - 1, t)
if lwb > 0:
	res += (lwb - 1) * min(w, b)
	res += min(min(w, b), t - lwb * lcm + 1)
g = gcd(res, t)
res //= g
t //= g
print('%d/%d' % (res, t))


import sys
import math
from fractions import Fraction
(t, w, b) = map(int, input().split())
lcm = w * b // math.gcd(w, b)
ans = (t // lcm + 1) * min(w, b) - max(0, min(w, b) - t % lcm - 1) - 1
ans_frac = Fraction(ans, t)
print('{}/{}'.format(ans_frac.numerator, ans_frac.denominator))


import math
(t, w, b) = map(int, input().split(' '))
l = t // (w * b // math.gcd(w, b))
numerator = l * min(w, b) + min(t - l * (w * b // math.gcd(w, b)) + 1, min(w, b)) - 1
print(numerator // math.gcd(numerator, t), '/', t // math.gcd(numerator, t), sep='')


def gcd(a, b):
	while b != 0:
		(a, b) = (b, a % b)
	return a
(t, a, b) = map(int, input().split())
if a > b:
	(a, b) = (b, a)
m = a * b // gcd(a, b)
d = t // m
count = -1 + (d + 1) * a
x = d * m + a - 1
if x > t:
	count -= x - t
f = gcd(count, t)
print('%d/%d' % (count // f, t // f))


(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))


import math

def ggcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
(t, w, b) = map(int, input().split())
tot = t
draw = 0
lcm = w * b // ggcd(int(w), int(b))
cadd = min(w, b) - 1
cur = tot // lcm
if cur * lcm + cadd > t:
	draw = draw + 1 + cadd - (int(cur) * int(lcm) + int(cadd) - t)
	cur = int(cur) - 1
draw = draw + (1 + int(cadd)) * (int(cur) + 1)
draw = draw - 1
gg = ggcd(int(tot), int(draw))
print(int(draw) // int(gg), end='/')
print(int(tot) // int(gg))


def gcd(a, b):
	while b > 0:
		(a, b) = (b, a % b)
	return a
(t, a, b) = map(int, input().split())
x = gcd(a, b)
d = min(a, b)
nok = a * b // x
p = t // nok * d + min(d, t % nok + 1) - 1
q = t
y = gcd(p, q)
print(p // y, '/', q // y, sep='')


import math
(t, b, w) = list(map(int, input().split()))
if b == w:
	print('1/1')
	exit(0)
lcm = b // math.gcd(b, w) * w
x = t // lcm
ans = min(b, w) - 1
ans += (x - 1) * min(b, w)
ans += min(t - x * lcm + 1, min(b, w))
a = math.gcd(t, ans)
t = t // a
ans = ans // a
print(str(ans) + '/' + str(t))


from fractions import *
(t, w, b) = map(int, input().split())
num = t // (w * b // gcd(w, b)) * min(w, b) - 1 + min(t % (w * b // gcd(w, b)) + 1, min(w, b))
s = str(Fraction(num, t))
if '/' not in s:
	print(s + '/1')
else:
	print(s)


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) = list(map(int, input().split()))
if w > b:
	(w, b) = (b, w)
ans = w - 1
l = lcm(w, b)
ans += (t // l - 1) * w
lo = t // l * l
ans += min(w, t - lo + 1)
g = gcd(ans, t)
print(str(ans // g) + '/' + str(t // g))


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 math
from collections import deque, defaultdict
from sys import stdin, stdout
input = stdin.readline
listin = lambda : list(map(int, input().split()))
mapin = lambda : map(int, input().split())

def lcm(a, b):
	return a * b // math.gcd(a, b)
(t, w, b) = mapin()
m = lcm(w, b)
count = min(w - 1, b - 1)
p = t // m * m // m * (count + 1)
p += min(t % m, count)
q = t
z = math.gcd(p, q)
p //= z
q //= z
print(p, end='/')
print(q)


def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
(t, w, b) = list(map(int, input().split()))
if w == b:
	print(1, '/', 1, sep='')
	exit(0)
a = min(w, b) - 1
if a > t:
	print('1/1')
	exit(0)
q = w * b // gcd(w, b)
k = t // q
if k:
	ans = k + a + (k - 1) * a
	ans += min(t % q, a)
else:
	ans = a
m = gcd(ans, t)
ans = ans // m
t = t // m
print(ans, '/', t, sep='')


import sys
from fractions import Fraction, gcd

def lcm(x, y):
	return x // gcd(x, y) * y

def f(t, w, b):
	l = lcm(w, b)
	t += 1
	t0 = t - t % l
	ans = t0 // l * min(w, b)
	ans += min(t % l, min(w, b))
	ans -= 1
	return Fraction(ans, t - 1)
(t, w, b) = list(map(int, sys.stdin.readline().split()))
ans = f(t, w, b)
print('{}/{}\n'.format(ans.numerator, ans.denominator))


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

def lcm(a, b):
	return int(a * b // gcd(a, b))
(t, w, b) = map(int, input().split())
ans = t // lcm(w, b) * min(w, b)
ans += min(t % lcm(w, b), w - 1, b - 1)
print(ans // gcd(ans, t), end='')
print('/', end='')
print(t // gcd(ans, t))


def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)
(t, x, y) = input().split()
t = int(t)
x = int(x)
y = int(y)
z = gcd(x, y)
lcm = x * (y // z)
if x < y:
	cnt = x - 1
else:
	cnt = y - 1
z = cnt + 1
cnt = cnt + (t // lcm - 1) * z
if t % lcm < z:
	cnt = cnt + t % lcm + 1
else:
	cnt = cnt + z
z = gcd(cnt, t)
cnt = cnt // z
t = t // z
s = str(cnt) + '/' + str(t)
print(s)


from math import gcd
(t, a, b) = map(int, input().split())
if a > b:
	tmp = a
	a = b
	b = tmp
costl = a
l = int(a * b // gcd(a, b))
ans = int(t // l * costl)
rm = int(t % l)
ans += min(costl - 1, rm)
g = int(gcd(t, ans))
print('{}/{}'.format(ans // g, t // g))


from fractions import gcd
(t, w, v) = map(int, input().split())
lcm = w * v // gcd(w, v)
tie = t // lcm * min(w, v)
tie += min(min(w, v) - 1, t % lcm)
print(tie // gcd(tie, t), t // gcd(tie, t), sep='/')


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

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

def lcm(a, b):
	return a // gcd(a, b) * b
l = lcm(w, b)
a = t // l
x = a * (min(w, b) - 1) + a
if t % l != 0:
	x = a * (min(w, b) - 1) + a
	if min(w, b) <= t % l:
		x += min(w, b) - 1
	else:
		x += t % l
y = gcd(x, t)
print(str(x // y) + '/' + str(t // y))


from math import gcd
(t, a, b) = map(int, input().split())
l = a * b // gcd(a, b)
(a, b) = (min(a, b), max(a, b))
x = t // l
ans = x * a + min(t - l * x, a - 1)
x = gcd(ans, t)
print(ans // x, end='/')
print(t // x)


from fractions import gcd
(t, w, b) = map(int, input().split())
if w > b:
	(w, b) = (b, w)
lcm = w // gcd(w, b) * b
ans = (t // lcm + 1) * w - 1
if t % lcm + 1 < w:
	ans -= w - (t % lcm + 1)
g = gcd(ans, t)
print('%d/%d' % (ans // g, t // g))


import math
s = input()
(t, w, b) = s.split()
(t, w, b) = (int(t), int(w), int(b))
r = w * b // math.gcd(w, b)
p = t // r * min(w, b) + min(t % r + 1, min(w, b)) - 1
q = t
r = math.gcd(p, q)
print(str(p // r) + '/' + str(q // r))


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
	diff = max(count * l + m - t - 1, 0)
	result -= diff
	g = gcd(result, t)
	print('{}/{}'.format(result // g, t // g))
__starting_point()


import math
(t, w, b) = map(int, input().split())
cs = min(w, b) - 1
lcm = w * b // math.gcd(w, b)
fldiv = t // lcm * lcm
num = cs + (t // lcm - 1) * (cs + 1)
if fldiv + cs < t:
	num += cs + 1
else:
	num += t - fldiv + 1
g = math.gcd(num, t)
num //= g
t //= g
print(num, end='/')
print(t)


import io, math

def gcm(a, b):
	while a != 0 and b != 0:
		if a > b:
			a %= b
		else:
			b %= a
	return a + b
a = input().split()
for i in range(len(a)):
	a[i] = int(a[i])
nk = a[1] * a[2] // gcm(a[1], a[2])
ans = 0
if nk > a[0]:
	k = 0
else:
	k = a[0] // nk
	ans = k * min(a[1], a[2]) - 1
if nk > a[0]:
	ans = ans + min(min(a[1], a[2]) - 1, a[0])
else:
	ans = ans + min(a[0] - nk * k + 1, min(a[1], a[2]))
print(str(ans // gcm(ans, a[0])) + '/' + str(a[0] // gcm(ans, a[0])))


def gcd(a, b):
	while b > 0:
		t = b
		b = a % b
		a = t
	return a
(t, a, b) = map(int, input().split(' '))
hcf = a * b // gcd(a, b)
num = t // hcf * min(a, b) + min(t % hcf, min(a, b) - 1)
den = t
cgcd = gcd(num, den)
print(str(num // cgcd) + '/' + str(den // cgcd))


from fractions import gcd
from math import ceil

def lcm(a, b):
	return a * b // gcd(a, b)
x = map(int, input().split())
(t, w, b) = x
if w == b:
	print('1/1')
else:
	m = min(w, b)
	l = lcm(w, b)
	k = t // l
	p = k * m + min(m, t + 1 - k * l) - 1
	q = t
	d = gcd(p, q)
	if d != 1:
		p = p // d
		q = q // d
	print(str(p) + '/' + str(q))


import math
(t, w, b) = list(map(int, input().split()))
u = w * b // math.gcd(w, b)
minval = min(w, b)
ans = t // u * minval + min(minval - 1, t % u)
buf = math.gcd(ans, t)
print(str(ans // buf) + '/' + str(t // buf))


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

def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)
(x, d) = (gcd(a, b), min(a, b))
lcm = a * b // x
answer = t // lcm * d + min(d, t % lcm + 1) - 1
gcd_of = gcd(answer, t)
print(answer // gcd_of, '/', t // gcd_of, sep='')


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

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

def lcm(a, b):
	return a * b // gcd(a, b)
M = lcm(w, b)
ans = 0
ans += min(w, b, t) * (t // M)
ans += min(w - 1, b - 1, t % M)
p = ans
q = t
G = gcd(p, q)
p //= G
q //= G
print(str(p) + '/' + str(q))


def gcd(a, b):
	while a != 0 and b != 0:
		if a > b:
			a %= b
		else:
			b %= a
	return a + b
(n, a, b) = list(map(int, input().split()))
k = a // gcd(a, b) * b
if a > b:
	(a, b) = (b, a)
ans = (n // k + 1) * a - 1
if n % k < a:
	ans -= a - n % k - 1
k = gcd(n, ans)
print(str(ans // k) + '/' + str(n // k))


from math import gcd
(t, w, b) = tuple(map(int, input().split()))
gd = gcd(w, b)
gw = w * b // gd
of = min(w, b) - 1
ret = 0
i = t // gw
ret += (i + 1) * (of + 1) - 1
e = i * gw
ret -= max(e + of - t, 0)
print(str(ret // gcd(ret, t)) + '/' + str(t // gcd(ret, t)))


from fractions import gcd
(t, w, b) = map(int, input().split())
g = gcd(w, b)
l = w * b // gcd(w, b)
ans = min(t, min(w, b) - 1)
cnt = t // l - 1
ans += max(0, cnt * min(w, b))
if cnt >= 0:
	ans += min(min(w, b), t % l + 1)
gg = gcd(ans, t)
f = ans // gg
t = t // gg
print(str(f) + '/' + str(t))


def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)
(x, t, b) = map(int, input().split())
gc = gcd(t, b)
if t == b:
	print('1/1')
	exit(0)
iter = t * b // gc
ans = x // iter * min(t, b)
z = x % iter
ans += min(z, min(t, b) - 1)
gc = gcd(ans, x)
print(str(ans // gc) + '/' + str(x // gc))


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

def main():
	(t, a, b) = map(int, input().split())
	if b < a:
		(a, b) = (b, a)
	lcm = b // gcd(a, b) * a
	acc = t // lcm + (t // lcm + 1) * (a - 1)
	acc -= 0 if a < 1 + t % lcm else a - t % lcm - 1
	g = gcd(acc, t)
	print('{}/{}'.format(acc // g, t // g))
main()


def gcd(a, b):
	while a != 0 and b != 0:
		if a > b:
			a = a % b
		else:
			b = b % a
	return a + b
(n, m, k) = map(int, input().split())
gmk = m * k // gcd(m, k)
a = min(m, k) * (n // gmk - 1) + (min(m, k) - 1)
a += min(n, n // gmk * gmk + min(m, k) - 1) - n // gmk * gmk + 1
b = n
c = gcd(a, b)
a = a // c
b = b // c
if m == k:
	print('1/1')
else:
	print(str(a) + '/' + str(b))


(t, w, b) = map(int, input().split())
from fractions import gcd
lcm = lambda x, y: x * y // gcd(x, y)
l = lcm(w, b)
(m, d) = divmod(t, l)
s = min(w, b)
if m > 0:
	p = m * s - 1 + min(s - 1, d) + 1
else:
	p = min(s - 1, t)
g = gcd(p, t)
print(str(p // g) + '/' + str(t // g))


from fractions import gcd
(a, b, c) = map(int, input().split())
lcm1 = b * c // gcd(b, c)
ans1 = a // lcm1 * min(b, c) - 1
ans1 += min(a % lcm1 + 1, min(b, c))
ans1 = int(ans1)
print(str(ans1 // gcd(ans1, a)) + '/' + str(a // gcd(ans1, a)))


from math import gcd
(t, w, b) = input().split()
t = int(t)
w = int(w)
b = int(b)
lc = w * b // gcd(w, b)
v = min(w, b)
ans = t // lc * v + min(v - 1, t % lc)
o = gcd(int(ans), t)
s = str(ans // o) + '/' + str(t // o)
print(s)


(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))


import math as m
s = input()
lis = s.split()
t = int(lis[0])
w = int(lis[1])
b = int(lis[2])
if w > b:
	(w, b) = (b, w)
num = w * b // m.gcd(w, b)
c = t // num
ans = c * w
if ans > num * c + w - 1 - t and t < num * c + w - 1:
	ans -= num * c + w - 1 - t
ans += min(t, w - 1)
print(ans // m.gcd(ans, t), end='')
print('/', end='')
print(t // m.gcd(t, ans))


def lcm(a, b):
	while a != 0 and b != 0:
		if a > b:
			a %= b
		else:
			b %= a
	return a + b
(t, w, b) = map(int, input().split())
lcm_wb = w * b // lcm(w, b)
count = t // lcm_wb
min_wb = min(w, b)
ans = min_wb * (count - 1) + min_wb + min(t - lcm_wb * count, min_wb - 1)
gcb_anst = lcm(t, ans)
print(ans // gcb_anst, '/', t // gcb_anst, sep='')


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

def lcm(a, b):
	return a * b // gcd(a, b)
(t, w, b) = (int(i) for i in input().split())
x = min(w, b)
y = t // lcm(w, b)
ans = x - 1 + x * (y - 1) + min(t % lcm(w, b) + 1, x)
if t < max(w, b):
	if t < min(w, b):
		ans = t
	else:
		ans = min(w, b) - 1
print(ans // gcd(ans, t), '/', t // gcd(ans, t), sep='')


from fractions import *
(t, w, b) = map(int, input().split())
g = gcd(w, b)
lcm = w * b // g
naz = t
br = t // lcm + min(w, b) - 1
br += t // lcm * (min(w, b) - 1)
last = lcm * (t // lcm)
if last + min(w, b) - 1 > t:
	br -= min(w, b) - 1
	br += t - last
g = gcd(br, naz)
br //= g
naz //= g
print('{0}/{1}'.format(br, naz))


from fractions import gcd
(n, a, b) = list(map(int, input().split()))
a1 = min(a, b)
a2 = max(a, b)
ans = 0
ans += a1 - 1
hcf = a1 * a2 // gcd(a1, a2)
k = n // hcf
ans += a1 * k - a1
ans += min(a1, 1 + n - k * hcf)
if a1 == a2:
	print('1/1')
else:
	print(ans // gcd(ans, n), '/', n // gcd(ans, n), sep='')


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)


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

def lcm(a, b):
	return a // gcd(a, b) * b
(t, a, b) = map(int, input().split())
aub = lcm(a, b)
d = min(a, b)
res = (t // aub + 1) * d - 1 - max(0, d - 1 - t % aub)
d = gcd(res, t)
p = res // d
q = t // d
print(p, end='')
print('/', end='')
print(q)


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

def lcm(a, b):
	return a * b // gcd(a, b)
(T, W, B) = map(int, input().split())
LCM = lcm(W, B)
ANS = T // LCM
REQ = ANS * min(W, B)
REQ = REQ + min(W, B) - 1
C = ANS * LCM
C += min(W, B) - 1
ANS = REQ - max(0, C - T)
GCD = gcd(int(ANS), int(T))
(NUM, DENOM) = (ANS // GCD, T // GCD)
print(int(NUM), end='')
print('/', end='')
print(int(DENOM))


def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)
(t, w, z) = map(int, input().split(' '))
n = min(w, z)
y = w * z // gcd(w, z)
r = t // y
pp = min(r * y + n - 1, t)
pp = pp - r * y
q1 = r + r * (n - 1) + pp
z = gcd(q1, t)
print('%d/%d' % (q1 // z, t // z))


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

def lcm(a, b):
	return a * b // gcd(a, b)
(L, w, b) = input().split()
L = int(L)
w = int(w)
b = int(b)
if w > b:
	(w, b) = (b, w)
_lcm = lcm(w, b)
times = L // _lcm
margen = 0
if w >= 2:
	margen = w - 1
res = times
res += margen * times
res += min(margen, L % _lcm)
print(str(res // gcd(res, L)) + '/' + str(L // gcd(res, L)))


import sys
(t, a, b) = [int(i) for i in input().split()]

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

def gcd(a, b):
	if a % b != 0:
		return gcd(b, a % b)
	else:
		return b
if a > b:
	(a, b) = (b, a)
m = NOK(a, b)
if t % m < a - 1:
	ans_a = t % m
else:
	ans_a = a - 1
ans_b = t
if m <= t:
	ans_a = t // m
	ans_a = ans_a * a - 1
	if t % m < a - 1:
		ans_a += t % m + 1
	else:
		ans_a += a
l = gcd(ans_a, ans_b)
ans_a = ans_a // l
ans_b = ans_b // l
print('{}/{}'.format(ans_a, ans_b))


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) = [int(x) for x in input().split()]
lc = lcm(w, b)
len = t // lc
cnt = len * min(w, b)
cnt += min(t % lc + 1, min(w, b))
cnt = cnt - 1
g = gcd(cnt, t)
if cnt <= t:
	print('{0}/{1}\n'.format(cnt // g, t // g))
else:
	print('1/1')


def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)
(t, w, b) = input().split(' ')
t = int(t)
w = int(w)
b = int(b)
mcm = w * b // gcd(w, b)
cont = 0
res = t % mcm
cont += t // mcm + (min(w, b) - 1) * (t // mcm)
cont += min(res, min(w, b) - 1)
d = gcd(cont, t)
print(cont // d, '/', t // d, sep='')


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

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

def seg_size(l, r):
	return max(0, r - l + 1)

def cnt_of_divided(l, x):
	return l // x
(t, b, w) = map(int, input().split())
mn = min(min(b, w), t + 1)
l = lcm(b, w)
j = max(t // l, 1)
ans = seg_size(1, mn - 1) + seg_size(l * j, min(t, l * j + mn - 1))
ans = ans + (cnt_of_divided(l * j - 1, l) - cnt_of_divided(mn - 1, l)) * mn
d = gcd(ans, t)
ans //= d
t //= d
print(str(ans) + '/' + str(t))


from sys import stdin
import math
(t, w, b) = map(int, input().split())
d = math.gcd(w, b)
l = w * b // d
add = min(w, b)
ans = add * (t // l)
m = t % l
ans += min(add, m + 1)
ans -= 1
d = math.gcd(ans, t)
ans //= d
t //= d
print(ans, '/', t, sep='')


from fractions import Fraction
from fractions import gcd
(t, w, b) = map(int, input().split())
x = gcd(w, b)
lcm = w * b // x
v1 = t // lcm
v1 = v1 * min(b, w) + min(min(b, w) - 1, t - lcm * v1)
l = gcd(t, v1)
v1 //= l
t //= l
print('%d/%d' % (v1, t))


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

def kmm(a, b):
	return a * b // bmm(a, b)
(t, w, b) = [int(_) for _ in input().split()]
k = kmm(w, b)
m = min(w, b)
p = 0
p += t // k * m + (m - 1)
if t % k < m:
	p -= m - t % k - 1
q = t
b = bmm(p, q)
(p, q) = (p // b, q // b)
print(str(p) + '/' + str(q))


def gcd(a, b):
	while b:
		a %= b
		t = a
		a = b
		b = t
	return a
(t, w, b) = list(map(int, input().split(' ')))
q = t
p = min(w, b) - 1
nod = gcd(max(w, b), min(w, b))
nok = w // nod * b
k = t // nok * min(b, w)
k -= min(b, w) - 1
x = t % nok
k += min(x, min(b, w) - 1)
p += k
x = gcd(max(p, q), min(p, q))
s = str(p // x) + '/' + str(q // x)
print(s)


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

def lcm(a, b):
	return a * b // gcd(a, b)
(t, w, b) = (int(i) for i in input().split())
l = lcm(w, b)
g = gcd(w, b)
i = 0
res = (t // l + 1) * min(w, b) - 1 + min(0, t - t // l * l - min(w, b) + 1)
g2 = gcd(res, t)
print('%d/%d' % (res // g2, t // g2))


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

def lcm(a, b):
	return a // gcd(a, b) * b
(t, a, b) = map(int, input().split(' '))
p = lcm(a, b)
cnt = t // p
ans = min(a - 1, b - 1, t)
ans += max(0, cnt - 1) * min(a, b)
pos = cnt * p
if pos >= min(a, b):
	if t >= pos:
		l = pos
		r = pos + min(a, b) - 1
		r = min(r, t)
		ans += r - l + 1
g = gcd(ans, t)
print('{0}/{1}'.format(ans // g, t // g))


(t, a, 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
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)

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):
	if a == 0 or b == 0:
		return 0
	while b != 0:
		(a, b) = (b, a % b)
	return a
(t, w, b) = map(int, input().split())
d = gcd(w, b)
lcm = w // d * b
ans = 0
if t >= lcm:
	ans = min(w, b) * (t // lcm)
ans += min(t % lcm + 1, b, w)
ans -= 1
if ans == 0:
	print('0/1')
else:
	d2 = gcd(ans, t)
	print(str(ans // d2) + '/' + str(t // d2))


(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)


def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)
l = list(map(int, input().split()))
t = l[0]
w = l[1]
b = l[2]
ans = 0
lcm = w * b // gcd(w, b)
mul = t // lcm
if w > b:
	temp = w
	w = b
	b = temp
if t < lcm * mul + w - 1:
	ans = t - lcm * mul + 1
else:
	ans = w
ans += mul * w - 1
g2 = gcd(ans, t)
print(ans // g2, '/', t // g2, sep='')


from math import *

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

def lcm(a, b):
	return a * b // gcd(a, b)
(t, w, b) = [int(x) for x in input().split()]
ans = t // lcm(w, b) * min(w, b) + min(w, b, t % lcm(w, b) + 1) - 1
print('{0}/{1}'.format(ans // gcd(ans, t), t // gcd(ans, t)))


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

def solve(t, w, b):
	lcm = w * b // fractions.gcd(w, b)
	tie = t // lcm * min(w, b) - 1 + min(t % lcm, b, w)
	if t // w * w == t // b * b:
		tie += 1
	g = fractions.gcd(tie, t)
	print('{}/{}'.format(tie // g, t // g))
solve(t, w, b)


import math as m
(t, w, b) = map(int, input().split())
gc = m.gcd(w, b)
mini = min(w, b)
lc = w * b // gc
bot = t
num = t // lc + 1
cnt = 0
cnt += (num - 1) * mini
temp = (num - 1) * lc
cnt += min(t, temp + mini - 1) - temp
gc2 = m.gcd(cnt, bot)
cnt = cnt // gc2
bot = bot // gc2
print(cnt, '/', bot, sep='')


from math import gcd
(t, w, b) = map(int, input().split())
c = w * b // gcd(w, b)
p = min(t, min(w, b) - 1)
if t >= c:
	p += (t // c - 1) * min(w, b)
	x = t // c * c
	p += min(w, b, t - x + 1)
q = t
g = gcd(p, q)
p //= g
q //= g
print(p, q, sep='/')


import fractions

def lcm(a, b):
	return abs(a * b) // fractions.gcd(a, b)
(t, w, b) = map(int, input().split())
l = lcm(w, b)
n = min(w, b) * (t // l) - 1
n += min(t % l + 1, min(w, b))
g = fractions.gcd(n, t)
print(n // g, t // g, sep='/')


def gcd(n, m):
	if n < m:
		tmp = n
		n = m
		m = tmp
	while m > 0:
		nn = n % m
		n = m
		m = nn
	return n
(t, w, b) = input().split()
t = int(t)
w = int(w)
b = int(b)
g = gcd(w, b)
h = w // g * (b // g) * g
dr = t // h
dnr = min(t - dr * h, min(w, b) - 1) + dr * (min(w, b) - 1)
dans = dr + dnr
dd = gcd(t, dans)
ans = dans // dd
ansb = t // dd
print(str(ans) + '/' + str(ansb))


from fractions import gcd
(t, w, b) = map(int, input().split())
g = gcd(w, b)
a = w // g * b
cnt = t // a
cnt = cnt * min(w, b) + min(min(w, b) - 1, t - a * cnt)
g = gcd(cnt, t)
print('%d/%d' % (cnt // g, t // g))


from fractions import gcd
(t, w, b) = 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))


def mygcd(a, b):
	if a % b == 0:
		return b
	else:
		return mygcd(b, a % b)
(t, w, b) = input().split(' ')
t = int(t)
w = int(w)
b = int(b)
x = w
y = b
w = min(x, y)
b = max(x, y)
lcm = w * b
lcm = lcm // mygcd(w, b)
u = t // lcm * w + min(w - 1, t % lcm)
xx = mygcd(u, t)
u //= xx
t //= xx
print(u, '/', t, sep='')


def GCD(a, b):
	if b == 0:
		return a
	else:
		return GCD(b, a % b)
(k, x, y) = input().split(' ')
k = int(k)
x = int(x)
y = int(y)
if x > y:
	aux = y
	y = x
	x = aux
lcm = x * y // GCD(x, y)
a = k // lcm * x + (x - 1)
a -= max(0, k // lcm * lcm + (x - 1) - k)
if x == y:
	print('1/1')
else:
	print(str(int(a // GCD(a, k))) + '/' + str(int(k // GCD(a, k))))


import fractions
from fractions import Fraction
(T, W, B) = map(int, input().split())
(W, B) = (min(W, B), max(W, B))
lcm = W * B
lcm = lcm // fractions.gcd(W, B)
cnt = T // lcm
total = cnt * lcm + W - 1
loss = max(total - T, 0)
cnt = (cnt + 1) * W - loss - 1
res = Fraction(cnt, T)
print(res.numerator, end='/')
print(res.denominator)


s = input()
L = s.split()
t = int(L[0])
w = int(L[1])
b = int(L[2])

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

def lcm(a, b):
	return a // gcd(a, b) * b
if w == b:
	print('1/1')
else:
	minspeed = min(w, b)
	maxspeed = max(w, b)
	if t >= lcm(w, b):
		den = t
		num = t // lcm(w, b) * minspeed + min(minspeed - 1, t % lcm(w, b))
		temp = gcd(num, den)
		num = num // temp
		den = den // temp
		print(str(num) + '/' + str(den))
	else:
		num = min(minspeed - 1, t)
		den = t
		temp = gcd(num, den)
		num = num // temp
		den = den // temp
		print(str(num) + '/' + str(den))


import math as mt
import sys, string
input = sys.stdin.readline
import collections
from heapq import heappush, heapify, heappop
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())

def lcm(a, b):
	return a * b // mt.gcd(a, b)
(t, w, b) = M()
x = t
s = lcm(w, b)
ans = t // s
ans = ans * min(w, b)
t %= s
ans += min(w - 1, b - 1, t)
print(str(ans // mt.gcd(ans, x)) + '/' + str(x // mt.gcd(ans, x)))


from fractions import gcd, Fraction
(t, w, b) = map(int, input().split())
if w > b:
	(w, b) = (b, w)
nok = w * b // gcd(w, b)
cnt = t // nok
ans = Fraction(cnt * w - 1 + min([t - cnt * nok + 1, w]), t)
print('{0}/{1}'.format(ans.numerator, ans.denominator))


def gcd(a, b):
	if a < b:
		(a, b) = (b, a)
	while b != 0:
		tmp = a % b
		a = b
		b = tmp
	return a
data = input().split()
l = int(data[0])
w = int(data[1])
b = int(data[2])
m = min(w, b)
t = w * b // gcd(w, b)
res = l // t * m + min(l % t, m - 1)
pp = gcd(res, l)
a1 = res // pp
a2 = l // pp
print('%u/%u' % (a1, a2))


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 math import *
(t, w, b) = map(int, input().split())
x = w * b // gcd(w, b)
ans = t // x * min(w, b) + min(w, b) - 1
if t // x * x + min(w, b) - 1 > t:
	ans -= t // x * x + min(w, b) - 1 - t
y = gcd(ans, t)
ans = ans // y
t = t // y
print(str(ans) + '/' + str(t))


import math

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a
(t, a, b) = map(int, input().split())
ans = 0
q1 = gcd(a, b)
nok = a * b // q1
q1 = t // nok
q1 = t // nok
ans += q1 - 1
ans += q1 * (min(a, b) - 1)
ans += min(t - q1 * nok + 1, min(a, b))
k = gcd(ans, t)
print(str(ans // k) + '/' + str(t // k))


from fractions import gcd
s = input()
(t, w, b) = s.split(' ')
t = int(t)
w = int(w)
b = int(b)
if b > w:
	tt = b
	b = w
	w = tt
gcc = w * b // gcd(w, b)
k = (t + 1) // gcc
ans = k * b + min((t + 1) % gcc, b) - 1
gc = gcd(t, ans)
ans = ans // gc
t = t // gc
print(str(ans) + '/' + str(t))


def gcd(a, b):
	return b if a == 0 else gcd(b % a, a)
(t, a, b) = list(map(int, input().split()))
nod = gcd(a, b)
nok = a * b // nod
c = (t // nok + 1) * min(a, b) - 1
s = t % nok
if s < min(a, b):
	c -= min(a, b) - s - 1
nod = gcd(t, c)
c //= nod
t //= nod
print(str(c) + '/' + str(t))


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

def lca(a, b):
	return a * b // gcd(a, b)
inp = input().split()
t = int(inp[0])
a = int(inp[1])
b = int(inp[2])
mn = min(a, b)
ans = mn - 1
cnt = t // lca(a, b)
ans += (cnt - 1) * mn
q = cnt * lca(a, b)
add = min(mn, t - q + 1)
ans += add
g = gcd(ans, t)
ans = ans // g
t = t // g
print(str(ans) + '/' + str(t))


from math import gcd
(t, a, b) = list(map(int, input().split()))
if a > b:
	(a, b) = (b, a)
lcmab = a * b // gcd(a, b)
res = (t // lcmab + 1) * a - 1
lmax = t // lcmab * lcmab + a - 1
if lmax > t:
	res -= lmax - t
gcdrt = gcd(res, t)
print('{}/{}'.format(res // gcdrt, t // gcdrt))


(t, w, b) = map(int, input().split())
gcd = lambda a, b: a if b == 0 else gcd(b, a % b)
nok = w * b // gcd(w, b)
k = min(w, b)
cnt = t // nok * k - 1 + min(k, t % nok + 1)
d = gcd(cnt, t)
(p, q) = (cnt // d, t // d)
ans = str(p) + '/' + str(q)
print(ans)


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

def lcm(a, b):
	return a * b // gcd(a, b)
(t, w, b) = input().split(' ')
b = int(b)
w = int(w)
t = int(t)
tmp = lcm(w, b)
cnt = t // tmp
ans = 0
if cnt * tmp + min(w, b) > t:
	ans = ans + t - cnt * tmp + 1
	cnt = cnt - 1
ans = ans + (cnt + 1) * min(w, b) - 1
k = gcd(ans, t)
ans = ans // k
t = t // k
print('%d/%d' % (ans, t))


import fractions
import random
import sys

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

def _(f):
	for l in f:
		for i in l.split():
			yield int(i)
g = _(sys.stdin)
(t, w, b) = (next(g), next(g), next(g))
lcm = w * b // gcd(w, b)
q = t // lcm
N = q * min(w, b) - 1
N += min(q * lcm + min(w - 1, b - 1), t) - q * lcm + 1
f = fractions.Fraction(N, t)
if str(f) == '0':
	print('0/1')
elif str(f) == '1':
	print('1/1')
else:
	print(str(f))


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='/')


(t, v1, v2) = map(int, input().split())

def gcd(a, b):
	c = 0
	while b > 0:
		c = a % b
		a = b
		b = c
	return a
if v1 < v2:
	te = v1
	v1 = v2
	v2 = te
k = v1 * v2 // gcd(v1, v2)
r = v2 - 1
r += t // k * v2
h = t // k * k
ad = t // k * k + v2 - 1 - t
if ad > 0:
	r -= ad
print(str(r // gcd(t, r)) + str('/') + str(t // gcd(t, r)))


import sys
data = sys.stdin.readline()
data = map(int, data.split())

def gcd(u, v):
	while v != 0:
		r = u % v
		u = v
		v = r
	return u
(t, w, b) = tuple(data)
ppcm = w * b // gcd(w, b)
p = (t // ppcm + 1) * min([w, b]) - 1
p -= max([t // ppcm * ppcm + min([w, b]) - t - 1, 0])
d = gcd(p, t)
print(str(p // d) + '/' + str(t // d))


from sys import stdin, stdout
import sys
import random
import datetime
endl = '\n'

class Scan:

	def __init__(self):
		self.read = stdin.read
		self.input = stdin.readline

	def integer(self, count=1):
		if count == 1:
			return self._integer()
		return [self._integer() for _ in range(count)]

	def _integer(self):
		sym: str = self.read(1)
		while sym != '-' and (not sym.isdigit()):
			sym = self.read(1)
		(number, sign) = (0, -1) if sym == '-' else (int(sym), 1)
		sym: str = self.read(1)
		while sym.isdigit():
			number = number * 10 + int(sym)
			sym = self.read(1)
		return number * sign

	def array(self, func=int, sep=' '):
		if func == str:
			return input().split(sep)
		return list(map(func, input().split(sep)))

	def string(self, count=1):
		if count == 1:
			return self._string()
		return [self._string() for _ in range(count)]

	def _string(self):
		sym = self.read(1)
		while sym in ('\n', '\r', ' '):
			sym = self.read(1)
		s = str()
		while sym not in ('\n', '\r', ' '):
			s += sym
			sym = self.read(1)
		return s

class Write:

	def __lshift__(self, other):
		stdout.write(str(other))
		return self

class Number:

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

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

	def sqrt(n):
		sqrt_n = int(n ** 0.5)
		while sqrt_n * sqrt_n < n:
			sqrt_n += 1
		while sqrt_n * sqrt_n > n:
			sqrt_n -= 1
		return sqrt_n

	def sum_n(n):
		return n * (n + 1) // 2

class Constants:
	EPS = 10 ** (-9)
	INF = 10 ** 18
	MOD = 10 ** 9 + 7

def solution(scan: Scan, write: Write):
	(n, a, b) = scan.integer(3)
	if a > b:
		(a, b) = (b, a)
	lcm = Number.lcm(a, b)
	ans = a - 1
	k = (n - a + 1) // lcm
	ans += k * a
	ans += max(0, n - (k + 1) * lcm + 1)
	gcd = Number.gcd(ans, n)
	print(ans // gcd, '/', n // gcd, sep='')

def main():
	queries: int = 1
	(scan, write) = (Scan(), Write())
	for _ in range(queries):
		solution(scan, write)
main()


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

def lcm(a, b):
	g = gcd(a, b)
	return a // g * b
(t, a, b) = input().split()
t = int(t)
a = int(a)
b = int(b)
ans = t // lcm(a, b) * min(a, b)
ans += min(t % lcm(a, b) + 1, min(a, b))
ans -= 1
g2 = gcd(ans, t)
print('%d/%d\n' % (ans // g2, t // g2))


from fractions import gcd
lcm = lambda x, y: x * y // gcd(x, y)
(t, w, b) = map(int, input().split())
mini = min(w, b)
ans = (t // lcm(w, b) - 1) * mini + (mini - 1) + min(mini, t - lcm(w, b) * (t // lcm(w, b)) + 1)
print('{0}/{1}'.format(ans // gcd(ans, t), t // gcd(ans, t)))


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

def lcm(a, b):
	return a * b // gcd(a, b)
(t, w, b) = map(int, input().split())
l = lcm(w, b)
cntB = t // l
ans = min(w, b) * cntB + min(w, b, t - cntB * l + 1) - 1
g = gcd(ans, t)
ans //= g
t //= g
print(str(ans) + '/' + str(t))


def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
(t, a, b) = input().split()
t = int(t)
a = int(a)
b = int(b)
res = 0
if a == 1:
	res = t // b
elif b == 1:
	res = t // a
else:
	l = a * (b // gcd(a, b))
	if l > t:
		res = min(min(a, b) - 1, t)
	else:
		aux = max(t // l - 1, 0)
		res = aux * min(a, b) + min(a, b) - 1 + min(t % l + 1, min(a, b))
print('{}/{}'.format(res // gcd(res, t), t // gcd(res, t)))


s = input().split(' ')
t = int(s[0])
a = int(s[1])
b = int(s[2])

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
if a == b:
	print('1/1')
	exit()
if a == 1 | b == 1:
	nb = max(a, b)
	p = gcd(t, nb)
	print(nb // p, end='')
	print('/', end='')
	print(t // p)
else:
	lcm = a // gcd(a, b) * b
	nb = t // lcm
	fz = nb * min(a, b)
	if t >= lcm * nb + min(a, b):
		fz = fz + min(a, b) - 1
	else:
		fz = fz + (t - lcm * nb)
	p = gcd(t, fz)
	print(fz // p, end='')
	print('/', end='')
	print(t // p)


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

def lca(a, b):
	return a * b // gcd(a, b)
(t, a, b) = map(int, input().split())
if a > b:
	z = a
	a = b
	b = z
if a > t:
	print('1/1')
else:
	z = lca(a, b)
	d = t // z - 1
	ans = a - 1
	ans = ans + a * d
	c = t - (d + 1) * z + 1
	ans = ans + min(c, a)
	x = gcd(ans, t)
	ans = ans // x
	t = t // x
	print(str(ans) + '/' + str(t))


from math import gcd
l = list(input().split())
t = int(l[0])
w = int(l[1])
b = int(l[2])
if w > b:
	(w, b) = (b, w)
res = 0
inter = w * b // gcd(w, b)
if t < inter:
	res = min(t, w - 1)
elif t == inter:
	res = w
else:
	t2 = t - (inter - 1)
	qt = 1 + t2 // inter
	res = qt * w
	res += min(w, t2 % inter)
	res = max(0, res - 1)
g = gcd(res, t)
res //= g
t //= g
print('{}/{}'.format(res, t))


def gcd(a, b):
	if a < b:
		(a, b) = (b, a)
	return b if a % b == 0 else gcd(b, a % b)
(n, a, b) = map(int, input().split())
k = a * b // gcd(a, b)
res = min(a, b) * (n // k) + min(n % k + 1, min(a, b)) - 1
k = n if res == 0 else gcd(res, n)
print('{}/{}'.format(res // k, n // k))


from fractions import gcd
(t, w, b) = map(int, input().split())
lcm = w * b // gcd(w, b)
res = t // lcm * min(w, b)
res += min(min(w, b) - 1, t % lcm)
f = gcd(res, t)
print('{0}/{1}'.format(res // f, t // f))


from fractions import gcd
(a, b, c) = map(int, input().split(' '))
l = b * c // gcd(b, c)
(b, c) = (min(b, c), max(b, c))
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 a == 0:
		return b
	return gcd(b % a, a)

def reduceFraction(x, y):
	d = gcd(x, y)
	x = x // d
	y = y // d
	s = '' + str(int(x)) + '/' + str(int(y))
	print(s)
	return

def lcm(a, b):
	return a * b // gcd(a, b)
inp = list(map(int, input().split()))
t = inp[0]
w = inp[1]
b = inp[2]
z = min(w, b)
p = t // lcm(w, b) * z
p = p - z
if t % lcm(w, b) >= z - 1:
	p = p + z
else:
	p = p + (t % lcm(w, b) + 1)
p = p + (z - 1)
q = t
reduceFraction(p, q)


def R():
	return map(int, input().split())

def NOD(a, b):
	if a > b:
		tmp = a
		a = b
		b = tmp
	while a != 0 and b != 0:
		b = b % a
		tmp = a
		a = b
		b = tmp
	return a + b
(t, w, b) = R()
nd = NOD(w, b)
nk = b * w // nd
nkAmount = t // nk + 1
chisl = 0
if nkAmount > 1:
	chisl = (nkAmount - 1) * min(b, w)
lastNk = (nkAmount - 1) * nk
chisl += min(min(w, b), t - lastNk + 1) - 1
print(str(chisl // NOD(chisl, t)) + '/' + str(t // NOD(chisl, t)))


def gcd(a, b):
	while a > 0:
		b %= a
		(a, b) = (b, a)
	return b
(t, a, b) = map(int, input().split())
n = a * b // gcd(a, b)
m = min(a, b)
ans = 0
if m > 1:
	ans += m - 1
	ans += t // n * m
	if t % n + 1 < m:
		ans += t % n + 1 - m
else:
	ans = t // n
print(ans // gcd(ans, t), '/', t // gcd(ans, t), sep='')


from fractions import *
from math import *
(t, w, b) = map(int, input().split())
d = w * b // gcd(w, b)
e = min(w, b)
f = ~-(t - e + 1) // d + 1
g = min(e, max(0, t - f * d + 1))
n = Fraction(max(0, f * e) + g - 1, t)
print(f'{n.numerator}/{n.denominator}')


(t, w, b) = map(int, 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='')


def g(a, b):
	if 0 == b:
		return a
	return g(b, a % b)
i = input
(t, w, b) = map(int, i().split())
l = w * b // g(w, b)
m = min(w, b)
r = t // l * m + min(m - 1, t % l)
e = g(t, r)
print('%d/%d' % (r // e, t // e))


from sys import stdin
(t, w, b) = map(int, stdin.readline().strip().split())
from math import gcd

def lcm(a, b):
	return a * b // gcd(a, b)
x = min(w, b) - 1
y = t // lcm(w, b)
ans = y + (y - 1) * x + x
z = min(t - y * lcm(w, b), x)
ans += z
if t < min(w, b) or w == b:
	ans = t
g = gcd(ans, t)
while g != 1:
	ans = ans // g
	t = t // g
	g = gcd(ans, t)
print(str(ans) + '/' + str(t))


(n, w, b) = map(int, input().split())
from math import gcd
L = w * b // gcd(w, b)
m = min(b, w)
ans = (n - m + 1) // L + 1
ans *= m
if n // L == (n - m + 1) // L:
	pass
else:
	cn = n // L * L
	ans += n - cn + 1
ans -= 1
g = gcd(ans, n)
print(ans // g, '/', n // g, sep='')


from fractions import gcd
(n, p, q) = map(int, input().split())
lcm = p // gcd(p, q) * q
if p > q:
	(p, q) = (q, p)
full = n % lcm
if p <= full + 1:
	good = (n // lcm + 1) * p
else:
	good = n // lcm * p + full + 1
good -= 1
g = gcd(good, n)
print('{}/{}'.format(good // g, n // g))


def nod(a, b):
	while b != 0:
		(a, b) = (b, a % b)
	return a
(t, w, b) = map(int, input().split())
q = nod(w, b)
q = w * b // q
(w, b) = (min(w, b), max(w, b))
col = t // q
e = 0
if t % q < w:
	e = w - t % q - 1
g = (col + 1) * w - 1 - e
v = nod(g, t)
t = t // v
g = g // v
print(g, '/', t, sep='')


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

def reduct(x, y):
	g = gcd(x, y)
	while g != 1:
		while x % g == 0 and y % g == 0:
			x = x // g
			y = y // g
		g = gcd(x, y)
	print(str(x) + '/' + str(y))
(t, w, b) = map(int, input().split())
rest = min(w, b) - 1
s = w * b // gcd(w, b)
div = t // s
mod = t % s
ans = div + div * rest + min(mod, rest)
reduct(ans, t)


import fractions

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

def solve():
	(t, w, b) = map(int, input().split())
	if w > b:
		tt = w
		w = b
		b = tt
	l = lcm(w, b)
	ans = w - 1
	c = t // l
	ans += w * (c - 1)
	last = l * c
	ans += min(w, t - last + 1)
	g = fractions.gcd(ans, t)
	ans = ans // g
	t = t // g
	print(int(ans), '/', int(t), sep='')
solve()


def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)
(t, w, b) = map(int, input().split(' '))
GCD = w * b // gcd(w, b)
MIN = min(w, b)
ans = MIN - 1 + (int(t // GCD) - 1) * MIN + min(MIN, t - int(t // GCD) * GCD + 1)
son = int(ans // gcd(ans, t))
mom = int(int(t) // int(gcd(ans, t)))
print('%d/%d' % (son, mom))


def gcd(x, y):
	return gcd(y % x, x) if x else y
(t, w, b) = (int(x) for x in input().split())
lcm = w * b // gcd(w, b)
tmp = t // lcm
ans = tmp * min(w, b)
ans -= max(0, tmp * lcm + min(w - 1, b - 1) - t)
ans += min(w - 1, b - 1)
g = gcd(ans, t)
if g:
	ans //= g
	t //= g
print('%d/%d' % (ans, t))


import fractions
[t, w, b] = [int(x) for x in input().split()]
if w > b:
	(w, b) = (b, w)
gcd = fractions.gcd(w, b)
m = w * b // gcd
(l, k) = (t // m, t % m)
ans = l * w - 1 + min(k + 1, w)
gcd = fractions.gcd(ans, t)
print('%d/%d' % (ans // gcd, t // gcd))


from fractions import gcd
(t, w, b) = input().split()
t = int(t)
w = int(w)
b = int(b)
q = t // (w * b // gcd(w, b))
r = t % (w * b // gcd(w, b))
x = min(w, b) - 1
ans = min(x, r) + q * (x + 1)
d = gcd(ans, t)
print(ans // d, '/', t // d, sep='')


import sys

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
(a, b, c) = tuple(map(int, input().split()))
if b == c or a < min(b, c):
	print('1/1')
	sys.exit(0)
ans = min(b, c) - 1
x = b * c // gcd(b, c)
ans += a // x * min(b, c)
y = max(a // x * x + min(b, c) - 1 - a, 0)
ans -= y
y = gcd(ans, a)
ans //= y
a //= y
print(str(ans) + '/' + str(a))


def gcd(a, b):
	return gcd(b, a % b) if b > 0 else a
(t, w, b) = map(int, input().split())
lcm = w * b // gcd(w, b)
base = (t // lcm + 1) * min(w, b) - 1
less = t - t // lcm * lcm + 1
if less > 0 and less < min(w, b):
	base -= min(w, b) - less
g = gcd(base, t)
print('{0}/{1}'.format(base // g, t // g))


(t, w, b) = map(int, input().split())
from math import gcd
cycle = w * b // gcd(w, b)
ans = t // cycle * min(w, b)
ans += min(t % cycle + 1, w, b)
ans -= 1
newAns = ans // gcd(ans, t)
newT = t // gcd(ans, t)
print(str(newAns) + '/' + str(newT))


def gcd(a, b):
	if a % b == 0:
		return b
	else:
		return gcd(b, a % b)
(x, b, w) = map(int, input().split())
cop = b * w // gcd(b, w)
kol = min(b, w) - 1 + (x // cop - 1) * min(b, w) + min(x - x // cop * cop + 1, min(b, w))
ch = gcd(kol, x)
print(int(kol // ch), '/', int(x // ch), sep='')


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

def lcm(a, b):
	return a // gcd(a, b) * b
(t, a, b) = map(int, input().split())
m = lcm(a, b)
d = min(a, b)
res = (t // m + 1) * d - 1 - max(0, d - 1 - t % m)
print(res // gcd(res, t), '/', t // gcd(res, t), sep='')


s = input()
arr = s.split()
t = int(arr[0])
w = int(arr[1])
b = int(arr[2])

def mysum(a, L):
	to = a // L
	return L * (to * (to - 1)) // 2 + (a - to * L + 1) * to

def gcd(a, b):
	if a == 0:
		return b
	else:
		return gcd(b % a, a)
L = w * b // gcd(w, b)
res = 0
m = min(w - 1, b - 1, t)
res += m
res += mysum(t - 1, L) - mysum(t - m - 1, L)
res += t // L
denom = t
g = gcd(res, denom)
print('%d/%d' % (res // g, denom // g))


(t, w, b) = map(int, 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)
di = t // d
count = m * di
count = count + m - 1
d = di * d + m - 1
if d > t:
	count = count - (d - t)
gcdtcnt = gcd(t, count)
t = t // gcdtcnt
count = count // gcdtcnt
print(count, end='')
print('/', end='')
print(t, end='')


import math
(t, w, b) = map(int, input().split())
ans1 = min(w, b) - 1
gc = math.gcd(w, b)
lcm = max(w, b) // gc
lcm = lcm * min(b, w)
ans2 = t // lcm
ans3 = ans1 * (ans2 - 1)
last_com = ans2 * lcm
ans = ans1 + ans2 + ans3
if last_com + ans1 <= t:
	ans = ans + ans1
else:
	ans = ans + t - last_com
if w == b:
	ans = t
gcd = math.gcd(ans, t)
ans = ans // gcd
t = t // gcd
print(ans, end='')
print('/', end='')
print(t)


def gcd(a, b):
	return a if b == 0 else gcd(b, a % b)
(t, w, b) = map(int, input().split())
lcm = w // gcd(w, b) * b
gap = min(w, b)
ans = t // lcm * gap + min(t % lcm, gap - 1)
d = gcd(ans, t)
print(ans // d, '/', t // d, sep='')


def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
x = input()
x = [int(_) for _ in x.split()]
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))


def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)
(t, a, b) = map(int, input().split())
ggabc = gcd(a, b)
mul = a * b // ggabc
numer_times = t // mul
numer_times *= min(a, b)
numer_times += min(t % mul + 1, min(a, b))
numer_times -= 1
gg = gcd(numer_times, t)
num1 = numer_times // gg
num2 = t // gg
print(num1, '/', num2, sep='')


from math import gcd
(t, w, b) = map(int, input().split())
d = int(gcd(w, b))
m = w * b // d
ties = t // m
i = t // m
ties += (min(w, b) - 1) * i
ties += int(min(min(w, b) - 1, t - m * i))
d = int(gcd(ties, t))
num = ties // d
den = t // d
print(int(num), '/', int(den), sep='')


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

def lcm(a, b):
	return a * b // gcd(a, b)
(t, a, b) = map(int, input().split(' '))
p = 0
q = t
l = lcm(a, b)
p += t // l * min(a, b) - 1
p += min(t, t // l * l + min(a, b) - 1) - t // l * l + 1
g = gcd(p, q)
p //= g
q //= g
print(str(p) + '/' + str(q))


from fractions import gcd

def lcm(a, b):
	return a // gcd(a, b) * b
(t, w, b) = map(int, input().split())
preans = t // lcm(w, b) * min(w, b) + min(min(w, b) - 1, t % lcm(w, b))
ansh = preans // gcd(preans, t)
ansl = t // gcd(preans, t)
print(ansh, '/', ansl, sep='')


def evklid(a, b):
	while b > 0:
		(a, b) = (b, a % b)
	return a
(t, w, b) = tuple(map(int, input().split()))
y = min(w, b)
NOD = evklid(w, b)
NOK = w * b // NOD
numd = t // NOK + 1
m = y * (numd - 1) - 1
m = m + t % NOK + 1 if y > t % NOK else m + y
print(str(m // evklid(m, t)) + '/' + str(t // evklid(m, t)))


import sys
from fractions import Fraction
input = iter(sys.stdin.read().splitlines()).__next__

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

def lcm(a, b):
	return a // gcd(a, b) * b
(t, w, b) = map(int, input().split())
x = lcm(w, b)
m = min(w, b)
n = t // x
res = (n - 1) * m
if m > 1:
	res += m - 1
res += min(t - n * x + 1, m)
f = Fraction(res, t)
print('%d/%d' % (f.numerator, f.denominator))


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)))


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

def nok(a, b):
	return a * b // gcd(a, b)
answer = 0
(t, a, b) = map(int, input().split())
if a > b:
	(a, b) = (b, a)
g1 = nok(a, b)
q = t // g1
answer += q - 1
answer += q * (a - 1)
answer += min(t - q * g1 + 1, a)
g2 = gcd(answer, t)
print('%d/%d' % (answer // g2, t // g2))


import math
buff = input()
buff = list(map(int, buff.split(' ')))
t = int(buff[0])
a = int(buff[1])
b = int(buff[2])
ans = int(-1)
x = a // math.gcd(a, b) * b
r = min(a, b)
last = t // x * x
lg = t // x + 1
while True:
	dx = min(t - last + 1, r)
	r = r - dx
	ans = ans + dx * lg
	lg = lg - 1
	last = last + dx - x
	if r == 0:
		break
gg = math.gcd(ans, t)
print('{}/{}'.format(ans // gg, t // gg))


import math

def lcm(a, b):
	return a * b // math.gcd(a, b)
(t, a, b) = [int(x) for x in input().split()]
mcm = lcm(a, b)
mn = min(a, b) - 1
cycles = t // mcm
ans = cycles * mn + min(mn, t % mcm) + cycles
g = math.gcd(ans, t)
print(ans // g, '/', t // g, sep='')


import sys
import math
from fractions import Fraction
(t, w, b) = map(int, input().split())
lcm = w * b // math.gcd(w, b)
m = min(w, b)
c = t // lcm
ans = min(m - 1, t) + c * m
if m > t % lcm + 1 and c != 0:
	ans -= m - t % lcm - 1
ans_frac = Fraction(ans, t)
print('{}/{}'.format(ans_frac.numerator, ans_frac.denominator))


def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)
(t, w, b) = map(int, input().split())
t += 1
l = w // gcd(w, b) * b
r = t // l
ans = r * min(w, b)
ans += min(t % l, min(w, b))
ans -= 1
t -= 1
g = gcd(ans, t)
out = str(ans // g) + '/' + str(t // g)
print(out)


from math import gcd

def lcm(a, b):
	return a * b // gcd(a, b)
ans = 0
(t, w, b) = map(int, input().split())
if lcm(w, b) > t:
	ans = min(w - 1, b - 1, t)
else:
	lcmm = lcm(w, b)
	count = t // lcmm
	still = t - count * lcmm
	ans = min(still, w - 1, b - 1) + count * min(w, b)
print(ans // gcd(ans, t), t // gcd(ans, t), sep='/')


from fractions import gcd
thing = input()
thing = thing.split(' ')
t = int(thing[0])
w = int(thing[1])
b = int(thing[2])
small = min(w, b)
factor = gcd(w, b)
multiple = w * b // factor
most = t // multiple
goesover = 0
if most * multiple + small > t:
	goesover = most * multiple + small - t - 1
good = (most + 1) * small - goesover - 1
m = gcd(good, t)
top = good // m
bottom = t // m
print(str(top) + '/' + str(bottom))


import fractions
(t, w, b) = map(int, input().split())
lcm = w * b // fractions.gcd(w, b)
ex = b > 1 and w > 1
tdl = t // lcm
fr = fractions.Fraction(min(w, b) * (tdl - 1) + (1 + min(t % lcm, w - 1, b - 1)) + min(w - 1, b - 1), t)
if str(fr) == '1':
	print('1/1')
elif str(fr) == '0':
	print('0/1', sep='')
else:
	print(fr)


import fractions
(t, a, b) = map(int, input().split())
lcm = a * b // fractions.gcd(a, b)
mi = min(a, b)
ans = mi * (t // lcm + 1) - 1
umax = t // lcm * lcm + mi - 1
if umax > t:
	ans += t - umax
hcf = fractions.gcd(ans, t)
ans //= hcf
t //= hcf
print(str(ans) + '/' + str(t))


def NOD(a, b):
	while a != 0 and b != 0:
		if a > b:
			a = a % b
		else:
			b = b % a
	return a + b
(t, w, b) = map(int, input().split(' '))
l = w * b // NOD(w, b)
ans = 0
ans += max(0, t // l) * min(w, b)
ans += max(0, min(t % l + 1, min(w, b)))
res = ans - 1
d = NOD(res, t)
print(str(res // d) + '/' + str(t // d))


from fractions import gcd

def lcm(x, y):
	return x * y // gcd(x, y)

def solve(t, w, b):
	r = lcm(w, b)
	m = t // r
	return min(w, b) * m + min(t % r, min(w, b) - 1)
(t, w, b) = map(int, input().split())
p = solve(t, w, b)
(x, y) = (p // gcd(p, t), t // gcd(p, t))
print('/'.join(map(str, (x, y))))


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)))


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

def lcm(a, b):
	temp = gcd(a, b)
	if temp:
		return a // temp * b
	else:
		return 0
sol = 0
i = input()
i = i.split()
t = int(i[0])
w = int(i[1])
b = int(i[2])
sol += min(w, b)
cm = lcm(w, b)
sol *= t // cm
if t % cm:
	mn = min(t % cm, min(w, b))
	sol += mn
	if mn == min(w, b):
		sol -= 1
cd = gcd(sol, t)
if sol:
	sol //= cd
	t //= cd
else:
	t = 1
if w != b:
	print(str(int(sol)) + '/' + str(int(t)))
else:
	print('1/1')


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='/')


from math import *
from fractions import gcd
(t, w, b) = map(int, input().strip().split())
lc = w * b // gcd(w, b)
n1 = t // lc - 1
num = (n1 + 1) * min(w, b) - 1
mi = min(w, b)
no = (n1 + 1) * lc
var = min(no + mi - 1, t) - no + 1
num += var
g = gcd(num, t)
print(num // g, end='')
print('/', end='')
print(t // g)


def gcd(x, y):
	if y:
		return gcd(y, x % y)
	return x
(t, w, b) = map(int, input().split())
kpk = w * b // gcd(w, b)
ans = (t // kpk + 1) * min(w, b) - 1
ans -= max(0, min(w, b) - t % kpk - 1)
fpb = gcd(ans, t)
print(ans // fpb, '/', t // fpb, sep='')


import math

def gcd(a, b):
	while a != 0 and b != 0:
		if a > b:
			a = a % b
		else:
			b = b % a
	return max(a, b)
(t, w, b) = [int(x) for x in input().split()]
m = min(w, b) - 1
l = w * b // gcd(w, b)
rest = t % l
p = m + (1 + m) * (t // l - 1) + (1 + min(rest, m))
g = gcd(p, t)
p2 = p // g
t //= g
s = str(p2) + '/' + str(t)
print(s)


from math import gcd
(t, w, b) = map(int, input().split())
g = gcd(w, b)
lcm = w * b // g
mn = min(w, b)
ans = mn * (t // lcm) - 1 + min(mn, t % lcm + 1)
g = gcd(ans, t)
print(str(ans // g) + '/' + str(t // g))


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

def main():
	s = input()
	(n, w, b) = s.split()
	(n, w, b) = (int(n), int(w), int(b))
	q = n
	g = gcd(w, b)
	len = b * w // g
	minWB = min(w, b)
	p = n // len * minWB + min(n % len + 1, minWB) - 1
	g1 = gcd(p, q)
	if p > q:
		print(1, 1, sep='/')
	else:
		print(p // g1, q // g1, sep='/')
main()


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())
l = lcm(w, b)
m = min(w, b)
q = t
p = t // l * m
if t % l != 0:
	p += min(t % l, m - 1)
g = gcd(p, q)
p //= g
q //= g
print('{0}/{1}'.format(p, q))


def gcd(x, y):
	if x % y == 0:
		return y
	else:
		return gcd(y, x % y)

def lcm(x, y):
	return x * y // gcd(x, y)
(t, w, b) = map(int, input().split())
r = min(w, b) - 1
s = t // lcm(w, b) * lcm(w, b)
index = 0
index = min(t - s, r)
x = t // lcm(w, b) * (r + 1) + index
c = gcd(x, t)
num = x // c
den = t // c
print('%d/%d' % (num, den))


def gcd(a, b):
	return a if b == 0 else gcd(b, a % b)
(t, w, b) = [int(x) for x in input().split()]
lcd = w * b // gcd(w, b)
(k, d) = (min(w, b), t % lcd)
ans = (t // lcd + 1) * k - 1
if d < k:
	ans -= k - d - 1
print(ans // gcd(ans, t), '/', t // gcd(ans, t), sep='')


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='')


def gcd(a, b):
	if a == 0 or b == 0:
		return 1
	while b:
		(a, b) = (b, a % b)
	return a
(t, w, b) = list(map(int, input().split()))
step = w * b // gcd(w, b)
cnt = 0
cnt = (t // step - 1) * min(w, b)
cnt += min(min(w, b), t - t // step * step + 1)
cnt += min(w, b) - 1
GCD = gcd(t, cnt)
cnt //= GCD
t //= GCD
if cnt == 0:
	t = 1
print(str(cnt) + '/' + str(t))


def gcd(a, b):
	if not b:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b // gcd(a, b)
(t, w, b) = [int(x) for x in input().split()]
c = lcm(w, b)
cnt = int(min(w, b) * (t // c))
r = t % c
if r >= min(w, b):
	r = min(w, b) - 1
cnt += r
q = gcd(cnt, t)
print('%d/%d' % (int(cnt // q), int(t // q)))


from math import gcd

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(mi())

def gc(w, d):
	return int(gcd(w, d))
(t, w, d) = mi()
GCD = gc(w, d)
LCM = w * d // GCD
if w == d or t < min(w, d):
	nr = 1
	dr = 1
	print(str(nr) + '/' + str(dr))
	exit()
nr = t // LCM * min(w, d)
nr += min(t - t // LCM * LCM, min(w, d) - 1)
dr = t
GCD = gc(nr, dr)
nr //= GCD
dr //= GCD
print(str(nr) + '/' + str(dr))


from math import *
HOME = False

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

def brut(t, a, b):
	sol = 0
	for i in range(1, t + 1):
		if i % a == i % b:
			sol += 1
	return sol

def main():
	(t, a, b) = input().split()
	t = int(t)
	a = int(a)
	b = int(b)
	if a > b:
		(a, b) = (b, a)
	lcm = a * b // gcd(a, b)
	k = t // lcm
	sol = a * k + min(t % lcm, a - 1)
	if HOME:
		if brut(t, a, b) != sol:
			print('AICI')
	p = sol
	q = t
	d = gcd(p, q)
	p = p // d
	q = q // d
	print(str(p) + '/' + str(q))
if HOME:
	while True:
		main()
else:
	main()


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

def NOK(a, b):
	return a * b // NOD(a, b)
(t, w, b) = map(int, input().split())
ans = 0
x = 0
d = 0
if t < min(w, b) or w == b:
	print('1/1')
	raise SystemExit(0)
x = t // NOK(w, b)
if x == 0:
	ans = min(w, b) - 1
	print(ans // NOD(t, ans), '/', t // NOD(t, ans), sep='')
	raise SystemExit(0)
ans = x * (min(w, b) - 1) + x
d = x * NOK(w, b)
ans += min(min(w, b) - 1, t - d)
print(ans // NOD(t, ans), '/', t // NOD(t, ans), sep='')


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

def lcm(a, b):
	return a * b // gcd(a, b)
(t, a, b) = map(int, input().split())
p = min(a, b) * (t // lcm(a, b)) - 1
l = t // lcm(a, b) * lcm(a, b)
r = min(t, l + min(a, b) - 1)
p += r - l + 1
q = t
d = gcd(p, q)
p //= d
q //= d
print(p, '/', q, sep='')


import math
from decimal import *
import sys
from fractions import Fraction

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
inp = input().split()
t = int(inp[0])
w = int(inp[1])
b = int(inp[2])
g = gcd(w, b)
l = Fraction(w, g)
l = l * Fraction(b)
m = Fraction(t - t % l, l)
m += 1
mi = min(w, b)
m *= mi
if mi - t % l - 1 > 0:
	m = m - mi + t % l + 1
m -= 1
g2 = gcd(m, t)
ans1 = Fraction(m, g2)
ans2 = Fraction(t, g2)
print(str(ans1) + '/' + str(ans2))


import math
(t, w, b) = map(int, input().split(' '))
lcm = w * b // math.gcd(w, b)
mi = min(w, b) - 1
ans = 0
ans = ans + min(mi, t)
q = t // lcm
end = q * lcm
ans = ans + q
if q > 0:
	ans = ans + (q - 1) * mi
	ans = ans + min(mi, t - end)
g = math.gcd(ans, t)
ans = ans // g
t = t // g
print(str(ans) + '/' + str(t))


from math import gcd
(t, mn, mx) = map(int, input().split())
if mn > mx:
	(mn, mx) = (mx, mn)
lcm = mn * mx // gcd(mn, mx)
cnt = t // lcm
ret = mn - 1 + cnt * mn
last = t - t % lcm
if last + mn > t:
	ret -= last + mn - t - 1
g = gcd(ret, t)
print('%d/%d' % (ret // g, t // g))


def gcd(a, b):
	if b != 0:
		return gcd(b, a % b)
	return a
(q, w, b) = map(int, input().split())
lcm = w // gcd(w, b) * b
p = q // lcm * min(w, b) - 1 + min(q % lcm + 1, min(w, b))
print(p // gcd(p, q), end='')
print('/', end='')
print(q // gcd(p, q))


gcd = lambda x, y: gcd(y, x % y) if y != 0 else x
nok = lambda x, y: x * y // gcd(x, y)

def print_fraction(x, y):
	print(str(x // gcd(x, y)) + '/' + str(y // gcd(x, y)))
(t, w, b) = map(int, input().split())
g = nok(w, b)
p = min(w, b)
if p - 1 >= t:
	print_fraction(1, 1)
else:
	n = (t + 1 - p) // g
	ans = p + n * p + max(0, t + 1 - g * (n + 1))
	print_fraction(ans - 1, t)


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

def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)
lcm = w * b // gcd(w, b)
divide = 0
if min(w, b) <= t:
	divide = t // lcm
total = min(w - 1, b - 1) + divide * min(w - 1, b - 1) + divide
close = t // lcm * lcm
if t - close < min(w, b) and w != 1 and (b != 1):
	total -= min(w - 1, b - 1) - (t - close)
g = gcd(total, t)
s = str(total // g) + '/' + str(t // g)
print(s)


def min(a, b):
	if a < b:
		return a
	return b

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

def lcm(a, b):
	return a * b // gcd(a, b)
(x, a, b) = map(int, input().split())
ans = min(a, b) * (x // lcm(a, b)) + min(min(a, b) - 1, x - x // lcm(a, b) * lcm(a, b))
g = gcd(ans, x)
ans = ans // g
x = x // g
s = str(ans) + '/' + str(x)
print(s)


def gcd(x, y):
	return x if y == 0 else gcd(y, x % y)
(t, w, b) = map(int, input().split(' '))
lcm = w * b // gcd(w, b)
if w > b:
	(w, b) = (b, w)
res = t // lcm * w + min(t % lcm, w - 1)
tmp = gcd(res, t)
print(str(res // tmp) + '/' + str(t // tmp))


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

def lcm(a, b):
	return a // gcd(a, b) * b
v = input().split(' ')
t = int(v[0])
a = int(v[1])
b = int(v[2])
if a > b:
	c = a
	a = b
	b = c
l = lcm(a, b)
all = t
good = t // l * a
if t >= l:
	good -= a
	good += min(t % l + 1, a)
good += min(t, a - 1)
g = gcd(good, all)
good //= g
all //= g
print(str(int(good)) + '/' + str(int(all)))


import fractions
(t, w, b) = map(int, input().split())
t += 1

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

def lcm(a, b):
	return a * b // gcd(a, b)
if w > b:
	(w, b) = (b, w)
l = lcm(w, b)
tie = t // l * w
tie += min(w, t % l)
tie -= 1
a = tie
b = t - 1
g = gcd(a, b)
a //= g
b //= g
print('%d/%d' % (a, b))


from math import *
from fractions import *

def nok(a, b):
	return a * b // gcd(a, b)
(t, w, b) = map(int, input().split(' '))
ans = min(t, min(w, b) - 1)
nk = t // nok(w, b)
ans += nk
if nk > 0:
	ans += (nk - 1) * (min(w, b) - 1)
	ans += min(t - nk * nok(w, b), min(w, b) - 1)
g = gcd(ans, t)
ra = ans // g
rb = t // g
print(str(ra) + '/' + str(rb))


def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a
(t, w, s) = [int(v) for v in input().split()]
com = gcd(w, s)
lcm = w * s // com
n = t // lcm
num = (n + 1) * min(w, s) - 1
end = n * lcm + min(w, s) - 1
if end > t:
	num -= end - t
g = gcd(num, t)
print('%d/%d' % (num // g, t // g))


import math
l = list(map(int, input().strip().split()))
t = l[0]
a = l[1]
b = l[2]
if a == b:
	print('1/1')
	exit(0)
if a > b:
	(a, b) = (b, a)
c = a * b // math.gcd(a, b)
ans = min(a - 1, t)
x = t // c * c
if x == 0:
	d = math.gcd(ans, t)
	print(str(ans // d) + '/' + str(t // d))
	exit(0)
ans += min(a, t - x + 1)
x = x // c
x -= 1
ans += x * a
ans = int(ans)
d = math.gcd(ans, t)
print(str(ans // d) + '/' + str(t // d))


import math

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

def lcm(a, b):
	return a // gcd(a, b) * b
(t, w, b) = map(int, input().split())
res = min(t, min(b, w) - 1)
l = lcm(b, w)
k = t // l
if k > 0:
	res += (k - 1) * min(b, w)
	res += min(t - k * l + 1, min(b, w))
g = gcd(res, t)
if res > 0:
	print('{}/{}'.format(res // g, t // g))
else:
	print('0/1')


def gcd(a, b):
	if a < b:
		t = b
		b = a
		a = t
	if b == 0:
		return a
	return gcd(b, a % b)
(t, w, b) = [int(x) for x in input().split()]
g = gcd(w, b)
nsn = w * b // g
k = t // nsn
r = t % nsn
res = k * min(w, b) + min(r + 1, min(w, b)) - 1
if t < nsn:
	res = min(t, min(w - 1, b - 1))
g2 = gcd(res, t)
s = str(res // g2) + '/' + str(t // g2)
print(s)


import itertools as it
import functools
import operator
import collections
import math
import sys
import fractions

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

def solve(t, w, b):
	k = min(w, b)
	interval = lcm(w, b)
	cycles = t // interval
	reminder = t % interval
	result = cycles * k + min(k - 1, reminder)
	g = fractions.gcd(result, t)
	return '%d/%d' % (result // g, t // g)

def print_stderr(*args, **kwargs):
	print(*args, file=sys.stderr, **kwargs)

def main():
	[t, w, b] = [int(i) for i in input().strip().split()]
	result = solve(t, w, b)
	print(result)
main()


from fractions import Fraction, gcd
(t, w, b) = map(int, input().split())
g = gcd(w, b)
n = min(w, b)
z = w * b // g
f = Fraction(n * ((t + 1) // z) + min((t + 1) % z, n) - 1, t)
print('%d/%d' % (f.numerator, f.denominator))


def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)
[t, w, b] = [int(i) for i in input().split()]
p = w * b // gcd(w, b)
mn = min(w, b)
l = t // p
cnt = mn * l
cnt += mn - 1
p = l * p + mn - 1
if p > t:
	cnt -= p - t
gcc = gcd(t, cnt)
t = t // gcc
cnt = cnt // gcc
print(cnt, '/', t, sep='')


from fractions import gcd

def lcm(a, b):
	return a * b // gcd(a, b)
(t, w, b) = map(int, input().split())
if w > b:
	(w, b) = (b, w)
lc = lcm(w, b)
k = t // lc
res = 0
res += k * w - 1
res += min(t - lc * k + 1, w)
g = gcd(res, t)
res //= g
t //= g
print('{}/{}'.format(res, t))


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

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

def main():
	(t, a, b) = map(int, input().split())
	if a > b:
		(a, b) = (b, a)
	ld = lcd(a, b)
	res = t // ld
	dep = t % ld
	dep += 1
	res *= a
	res += a - 1
	if dep < a:
		res -= a - dep
	divi = gcd(res, t)
	print(res // divi, t // divi, sep='/')
main()


import sys

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

def reduce(x, y):
	return (x // gcd(x, y), y // gcd(x, y))

def main():
	(t, w, b) = tuple(map(int, sys.stdin.read().split(' ')))
	lcm = w * b // gcd(w, b)
	if t < min(w, b):
		print('1/1')
	elif t < lcm:
		result = min(w, b) - 1
		print('{}/{}'.format(*reduce(result, t)))
	elif t % lcm >= min(w, b) - 1:
		result = min(w, b) - 1 + t // lcm * min(w, b)
		print('{}/{}'.format(*reduce(result, t)))
	else:
		result = min(w, b) - 1 + (t // lcm - 1) * min(w, b) + t % lcm + 1
		print('{}/{}'.format(*reduce(result, t)))
main()


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='')


def nod(a, b):
	if a > b:
		(a, b) = (b, a)
	while a > 0:
		(a, b) = (b % a, a)
	return b
(t, w, b) = [int(i) for i in input().split()]
nok = w * b // nod(w, b)
cnt = t // nok
if cnt >= 2:
	ans = (cnt - 1) * min(w, b) + (min(w, b) - 1) + min(t % nok + 1, min(w, b))
elif cnt == 1:
	ans = min(w, b) - 1 + min(t % nok + 1, min(w, b))
elif cnt == 0:
	ans = min(t, min(w, b) - 1)
if ans == 0:
	print('0/1')
else:
	d = nod(ans, t)
	print(str(ans // d) + '/' + str(t // d))


def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)
(t, w, b) = map(int, input().split())
cur = w * b // gcd(w, b)
cnt = t // cur
ans = min(t, max(cnt - 1, 0) * min(w, b) + min(w, b) - 1)
if cnt > 0:
	ans += min(t - cur * cnt + 1, min(w, b))
print(str(ans // gcd(ans, t)) + '/' + str(t // gcd(ans, t)))


import math
import heapq, bisect
import sys
from collections import deque, defaultdict
from fractions import Fraction
mod = 10 ** 9 + 7
mod1 = 998244353
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

class TreeNode:

	def __init__(self, k, v):
		self.key = k
		self.value = v
		self.left = None
		self.right = None
		self.parent = None
		self.height = 1
		self.num_left = 1
		self.num_total = 1

class AvlTree:

	def __init__(self):
		self._tree = None

	def add(self, k, v):
		if not self._tree:
			self._tree = TreeNode(k, v)
			return
		node = self._add(k, v)
		if node:
			self._rebalance(node)

	def _add(self, k, v):
		node = self._tree
		while node:
			if k < node.key:
				if node.left:
					node = node.left
				else:
					node.left = TreeNode(k, v)
					node.left.parent = node
					return node.left
			elif node.key < k:
				if node.right:
					node = node.right
				else:
					node.right = TreeNode(k, v)
					node.right.parent = node
					return node.right
			else:
				node.value = v
				return

	@staticmethod
	def get_height(x):
		return x.height if x else 0

	@staticmethod
	def get_num_total(x):
		return x.num_total if x else 0

	def _rebalance(self, node):
		n = node
		while n:
			lh = self.get_height(n.left)
			rh = self.get_height(n.right)
			n.height = max(lh, rh) + 1
			balance_factor = lh - rh
			n.num_total = 1 + self.get_num_total(n.left) + self.get_num_total(n.right)
			n.num_left = 1 + self.get_num_total(n.left)
			if balance_factor > 1:
				if self.get_height(n.left.left) < self.get_height(n.left.right):
					self._rotate_left(n.left)
				self._rotate_right(n)
			elif balance_factor < -1:
				if self.get_height(n.right.right) < self.get_height(n.right.left):
					self._rotate_right(n.right)
				self._rotate_left(n)
			else:
				n = n.parent

	def _remove_one(self, node):
		replacement = node.left or node.right
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = replacement
			else:
				node.parent.right = replacement
			replacement.parent = node.parent
			node.parent = None
		else:
			self._tree = replacement
			replacement.parent = None
		node.left = None
		node.right = None
		node.parent = None
		self._rebalance(replacement)

	def _remove_leaf(self, node):
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = None
			else:
				node.parent.right = None
			self._rebalance(node.parent)
		else:
			self._tree = None
		node.parent = None
		node.left = None
		node.right = None

	def remove(self, k):
		node = self._get_node(k)
		if not node:
			return
		if AvlTree._is_leaf(node):
			self._remove_leaf(node)
			return
		if node.left and node.right:
			nxt = AvlTree._get_next(node)
			node.key = nxt.key
			node.value = nxt.value
			if self._is_leaf(nxt):
				self._remove_leaf(nxt)
			else:
				self._remove_one(nxt)
			self._rebalance(node)
		else:
			self._remove_one(node)

	def get(self, k):
		node = self._get_node(k)
		return node.value if node else -1

	def _get_node(self, k):
		if not self._tree:
			return None
		node = self._tree
		while node:
			if k < node.key:
				node = node.left
			elif node.key < k:
				node = node.right
			else:
				return node
		return None

	def get_at(self, pos):
		x = pos + 1
		node = self._tree
		while node:
			if x < node.num_left:
				node = node.left
			elif node.num_left < x:
				x -= node.num_left
				node = node.right
			else:
				return (node.key, node.value)
		raise IndexError('Out of ranges')

	@staticmethod
	def _is_left(node):
		return node.parent.left and node.parent.left == node

	@staticmethod
	def _is_leaf(node):
		return node.left is None and node.right is None

	def _rotate_right(self, node):
		if not node.parent:
			self._tree = node.left
			node.left.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.left
			node.left.parent = node.parent
		else:
			node.parent.right = node.left
			node.left.parent = node.parent
		bk = node.left.right
		node.left.right = node
		node.parent = node.left
		node.left = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	def _rotate_left(self, node):
		if not node.parent:
			self._tree = node.right
			node.right.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.right
			node.right.parent = node.parent
		else:
			node.parent.right = node.right
			node.right.parent = node.parent
		bk = node.right.left
		node.right.left = node
		node.parent = node.right
		node.right = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	@staticmethod
	def _get_next(node):
		if not node.right:
			return node.parent
		n = node.right
		while n.left:
			n = n.left
		return n
avl = AvlTree()

class SegmentTree1:

	def __init__(self, data, default='z', func=lambda a, b: min(a, b)):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class SegmentTree:

	def __init__(self, data, default=0, func=lambda a, b: a + b):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class Factorial:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorials = [1, 1]
		self.invModulos = [0, 1]
		self.invFactorial_ = [1, 1]

	def calc(self, n):
		if n <= -1:
			print('Invalid argument to calculate n!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.factorials):
			return self.factorials[n]
		nextArr = [0] * (n + 1 - len(self.factorials))
		initialI = len(self.factorials)
		prev = self.factorials[-1]
		m = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * i % m
		self.factorials += nextArr
		return self.factorials[n]

	def inv(self, n):
		if n <= -1:
			print('Invalid argument to calculate n^(-1)')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		p = self.MOD
		pi = n % p
		if pi < len(self.invModulos):
			return self.invModulos[pi]
		nextArr = [0] * (n + 1 - len(self.invModulos))
		initialI = len(self.invModulos)
		for i in range(initialI, min(p, n + 1)):
			next = -self.invModulos[p % i] * (p // i) % p
			self.invModulos.append(next)
		return self.invModulos[pi]

	def invFactorial(self, n):
		if n <= -1:
			print('Invalid argument to calculate (n^(-1))!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.invFactorial_):
			return self.invFactorial_[n]
		self.inv(n)
		nextArr = [0] * (n + 1 - len(self.invFactorial_))
		initialI = len(self.invFactorial_)
		prev = self.invFactorial_[-1]
		p = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * self.invModulos[i % p] % p
		self.invFactorial_ += nextArr
		return self.invFactorial_[n]

class Combination:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorial = Factorial(MOD)

	def ncr(self, n, k):
		if k < 0 or n < k:
			return 0
		k = min(k, n - k)
		f = self.factorial
		return f.calc(n) * f.invFactorial(max(n - k, k)) * f.invFactorial(min(k, n - k)) % self.MOD

def powm(a, n, m):
	if a == 1 or n == 0:
		return 1
	if n % 2 == 0:
		s = powm(a, n // 2, m)
		return s * s % m
	else:
		return a * powm(a, n - 1, m) % m

def sort_list(list1, list2):
	zipped_pairs = zip(list2, list1)
	z = [x for (_, x) in sorted(zipped_pairs)]
	return z

def product(l):
	por = 1
	for i in range(len(l)):
		por *= l[i]
	return por

def binarySearchCount(arr, n, key):
	left = 0
	right = n - 1
	count = 0
	while left <= right:
		mid = int((right + left) / 2)
		if arr[mid] <= key:
			count = mid + 1
			left = mid + 1
		else:
			right = mid - 1
	return count

def countdig(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def countGreater(arr, n, k):
	l = 0
	r = n - 1
	leftGreater = n
	while l <= r:
		m = int(l + (r - l) / 2)
		if arr[m] >= k:
			leftGreater = m
			r = m - 1
		else:
			l = m + 1
	return n - leftGreater
(t, a, b) = map(int, input().split())
lc = a * b
lc //= math.gcd(a, b)
no = t // lc + 1
ex = (no - 1) * lc
ans = no * min(a, b) - 1
if ex + min(a, b) - 1 > t:
	ans -= ex + min(a, b) - t - 1
n = t
df = math.gcd(ans, n)
ans //= df
t //= df
st = str(ans) + '/' + str(t)
print(st)


from fractions import gcd
(t, w, b) = map(int, input().split())
lcm = w * b // gcd(w, b)
m = min(w, b)
s = t // lcm * m + min(t % lcm, m - 1)
g = gcd(s, t)
s //= g
t //= g
print('{}/{}'.format(s, t))


from fractions import gcd
(t, w, b) = [int(x) for x in input().strip().split()]
BadLen = w * b // gcd(w, b)
var = min(w, b)
times = t // BadLen * var
times -= 1
times += min(var, t - t // BadLen * BadLen + 1)
print(times // gcd(t, times), t // gcd(t, times), sep='/')


import math
import fractions
(t, w, b) = [int(x) for x in input().split()]
lcm = w * b // fractions.gcd(w, b)
times = t // lcm
(n, dn) = (times * min(w, b) + min(w, b, t - lcm * times + 1) - 1, t)
gcd = fractions.gcd(n, dn)
n //= gcd
dn //= gcd
print(str.format('{0}/{1}', n, dn))


import sys

def gcd(a, b):
	if a < b:
		return gcd(b, a)
	if b == 0:
		return a
	return gcd(b, a % b)
(t, w, b) = [int(i) for i in input().split()]
ml = min(w, b)
com = gcd(w, b)
nok = w * b // com
t1 = t // nok
t2 = t % nok
ans1 = t1 * ml
ans2 = min(t2 + 1, ml)
ans = ans1 + ans2 - 1
comt = gcd(ans, t)
print('{}/{}'.format(ans // comt, t // comt))


def NOK(a, b):
	(old_a, old_b) = (a, b)
	while b != 0:
		(a, b) = (b, a % b)
	return old_a * old_b // a

def NOD(a, b):
	while b != 0:
		(a, b) = (b, a % b)
	return a
(t, w, b) = map(int, input().split())
NOK = NOK(w, b)
ans = t // NOK * min(w, b) - 1
ans += min(t - t // NOK * NOK + 1, min(w, b))
NOD = NOD(ans, t)
print(ans // NOD, '/', t // NOD, sep='')


def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
s = input()
s = s.split()
t = int(s[0])
w = int(s[1])
b = int(s[2])
g = gcd(w, b)
w = w // g
r = w * b
w = w * g
k = t // r + 1
ans = k - 1 + (min(w, b) - 1) * (k - 1) + min(t % r, min(w, b) - 1)
ng = gcd(ans, t)
print(ans // ng, t // ng, sep='/')


import fractions
(t, w, b) = map(int, input().split())
l = w * b // fractions.gcd(w, b)
mn = min(w, b)
ans = (t // l + 1) * mn - max(mn - t % l - 1, 0) - 1
gat = fractions.gcd(t, ans)
print('%d/%d' % (ans // gat, t // gat))


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

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

def mmc(a, b):
	return a * b // mdc(a, b)
mm = mmc(a, b)
peso_ped = min(a, b) - 1
qtd_ped = l // mm
res = 0
res += qtd_ped
res += qtd_ped * peso_ped
restante = l % mm
res += min(restante, peso_ped)
md = mdc(res, l)
print(f'{res // md}/{l // md}')