l = [int(i) for i in input().split()] f = 0 for i in range(3): f += l[2*i]**l[2*i+1] if f%2 == 0: print(':-)') else: print(':-(')