l = list(map(int,input().split())) ret = 0 for i in range(3): a = l[2*i] b = l[2*i+1] ret += a**b print(':-)' if ret%2==0 else ':-(')