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