a1,b1,a2,b2,a3,b3 = map(int,input().split()) sum = a1**b1 + a2**b2 + a3**b3 if sum % 2 == 0: ans = ":-)" elif sum % 2 != 0: ans = ":-(" print(ans)