a1,b1,a2,b2,a3,b3 = gets.split.map(&:to_i) puts (a1**b1 + a2**b2 + a3**b3).even? ? ":-)" : ":-("