class P0059
  def self.solve(f)
    overlapOnX = false
    overlapOnY = false
    overlapOnX = true if overlapOn(f[0], f[2], f[4]) || overlapOn(f[0], f[2], f[6])
    overlapOnY = true if overlapOn(f[1], f[3], f[5]) || overlapOn(f[1], f[3], f[7])
    overlapOnA = overlapOnX && overlapOnY
    
    overlapOnX = false
    overlapOnY = false
    overlapOnX = true if overlapOn(f[4], f[6], f[0]) || overlapOn(f[4], f[6], f[2])
    overlapOnY = true if overlapOn(f[5], f[7], f[1]) || overlapOn(f[5], f[7], f[3])
    overlapOnB = overlapOnX && overlapOnY
    
    return "YES"  if overlapOnA || overlapOnB
    return "NO"
  end
  
  def self.overlapOn(v1, v2, v3)
    return true if v1 <= v3 && v3 <= v2
    return false
  end
end

while input = $stdin.gets
  puts P0059.solve(input.split(" "))
end