S1, S2 = input().split() x = (2 if 'S' in S1 and 'S' in S2 else [0, 1]['S' in S1]) print('8/' + str(31+x))