N = gets.to_i a = gets.split(" ").map(&:to_i) b = gets.split(" ").map(&:to_i) max_a = a.max sum = 0; (0..N-1).each{ |i| if b[i]==0 sum += a[i] end } if sum >= max_a puts "YES" else puts "NO" end