N = gets.to_i a = gets.split(" ").map(&:to_i) b = gets.split(" ").map(&:to_i) sum = Array.new(101,0) #sum[0]はKの合計点。他100人はs[1]~s[100] (0..100).each{ |i| (0..N).each{ |j| if b[j]==i sum[i] += b[j] end } } if sum[0] >= sum.max puts "YES" else puts "NO" end