eval'c=%p*101;%p.zip(%p){|k,l|c[l]+=k};puts c.max>c[0]?:NO:"YES"'%$<.map{|s|s.split.map &:to_i}