AB = list(map(int,input().split())) tp = AB[0]**AB[1] + AB[2]**AB[3] + AB[4]**AB[5] print(":-)" if tp%2==0 else ":-(")