A1, B1, A2, B2, A3, B3 = map(int, input().split()) sum = A1 ** B1 + A2 ** B2 + A3 ** B3 if sum % 2 == 0: print(':-)') elif sum % 2 != 0: print(':-(')