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