class Problem0892: def solve(this): a1,b1,a2,b2,a3,b3 = map(int,input().split()) res = a1 ** b1 + a2 ** b2 + a3 ** b3 if res % 2 == 0: print(":-)") else: print(":-(") if __name__ == "__main__": problem = Problem0892() problem.solve()