def f(xa, ya, xb, yb, xc, yc, xd, yd)
  cax = (xa + xb) / 2
  cay = (ya + yb) / 2
  cbx = (xc + xd) / 2
  cby = (yc + yd) / 2
  if (cax - cbx).abs <= (cax - xb).abs + (cbx - xd).abs and (cay - cby).abs <= (cay - yb).abs + (cby - yd).abs
    puts "YES"
  else
    puts "NO"
  end
end
while arg = gets
  f(*gets.split(" ").map(&:to_f))
end
    