#最简单的偷懒方法

while True:
    try:
        n, m = map(int, input().split('/'))
        if n == 1:
            print(str(n) + '/' + str(m))
        elif m % n == 0:
            print('1/' + str(int(m/n)))
        else:
            re = []
            for i in range(n):
                re.append('1/'+ str(m))
            print('+'.join(re))                 
    except:
        break