while str = gets do
  xa1, ya1, xa2, ya2, xb1, yb1, xb2, yb2 = str.chomp.split(" ").to_f
  a_w = xa2 - xa1
  a_h = ya2 - ya1
  c_a_x = (xa2 + xa1) / 2
  c_a_y = (ya2 + ya1) / 2

  b_w = xb2 - xb1
  b_h = yb2 - yb1
  c_b_x = (xb2 + xb1) / 2
  c_b_y = (yb2 + yb1) / 2

  if (a_w + b_w) / 2 >= (c_a_x - c_b_x).abs && (a_h + b_h) / 2 >= (c_a_y - c_b_y).abs
    puts "YES"
  else
    puts "NO"
  end
end