a1, b1, a2, b2, a3, b3 = map(int,input().split()) s = a1 ** b1 + a2 ** b2 + a3 ** b3 if s % 2 == 0: ans = ':-)' else: ans = ':-(' print(ans)