if __FILE__ == $0
  while line = gets
    xmn1, ymn1, xmx1, ymx1, xmn2, ymn2, xmx2, ymx2 = line.split.map{|i| i.to_f}
    if !(xmn1 > xmx2 || xmn1 > ymx2 || xmx1 < xmn2 || ymx1 < ymn2)
      puts "YES"
    else
      puts "NO"
    end
  end
end