if __FILE__ == $0
  while line = gets
    xa1, ya1, xa2, ya2, xb1, yb1, xb2, yb2 = line.split.map{|i| i.to_f}
    if !(xa1 > xb2 || xa1 > yb2 || xa2 < xb1 || yb2 < ya1)
      puts "YES"
    else
      puts "NO"
    end
  end
end