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