a1,b1,a2,b2,a3,b3 = gets.split.map(&:to_i) puts (a1.pow(b1, 2) + a2.pow(b2, 2) + a3.pow(b3,2))%2==0 ? ":-)" : ":-("