T=777 n,m=gets.split.map &:to_i a=[0]*n m.times{ b=gets.split.map &:to_i n.times{|i|a[i]+=b[i]} h=t=x=0 while hT x-=a[t] t+=1 end if x==T puts :YES exit end end } puts :NO