n = gets.chomp.split(" ") n.length.times do|i| n[i] = n[i].to_i end i = 0 sum = 0 while i <= n.length sum += n[i].to_i^n[i + 1].to_i i += 2 end if sum % 2 == 0 puts ":-)" else puts ":-(" end