def check(ary)
  ary[0], ary[1] = ary[1], ary[0] if ary[0] > ary[1]
  ary
end

$<.readlines.map {|l| l.split.map(&:to_r)}.each do |xa1, ya1, xa2, ya2, xb1, yb1, xb2, yb2|
  xa1, xa2 = check([xa1, xa2])
  ya1, ya2 = check([ya1, ya2])
  result = if (xa1 <= xb1 and xb1 <= xa2) && (ya1 <= yb1 and yb1 <= ya2) or
              (xa1 <= xb2 and xb2 <= xa2) && (ya1 <= yb2 and yb2 <= ya2) or
              (xa1 <= xb1 and xb1 <= xa2) && (ya1 <= yb2 and yb2 <= ya2) or
              (xa1 <= xb2 and xb2 <= xa2) && (ya1 <= yb1 and yb1 <= ya2)
    "YES"
  else
    "NO"
  end
  puts result
end
