A, a, B, b, C, c = map(int, inout().split()) if (A**a + B**b + C**c) % 2 == 1: print(":-(") else: print(":-)")