l=input().split() l=[int(i) for i in l] a=l[0]**l[1]+l[2]**l[3]+l[4]**l[5] if a%2==0: print(":-)") else: print(":-(")