key = 0 for i in range(3): a = int(input()) b = int(input()) key += a**b if key % 2 == 0: print(":-)") else: print(":-(")