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