A1, B1, A2, B2, A3, B3 = map(int, input().split()) if (pow(A1, B1, 2) + pow(A2, B2, 2) + pow(A3, B3, 2)) % 2 == 0: print(":-)") else: print(":-(")