Pascal Library

No attempts yetTime limit1sMemory limit128 MB

Problem

Pascal University, one of the oldest in the country, needs to renovate its Library Building, because after all these centuries the building has started to show the effects of supporting the weight of the enormous amount of books it houses.

To help with the renovation, the University's Alumni Association decided to organize a series of fund-raising dinners, to which all alumni were invited. These events proved to be a huge success and several were held during the past year.

The organizers kept a spreadsheet recording which alumni attended each dinner. Now they want your help to determine whether any alumnus or alumna attended all of the dinners.

Input

The input contains several test cases. The first line of each test case contains two integers $N$ and $D$, indicating respectively the number of alumni and the number of dinners organized ($1 \le N \le 100$ and $1 \le D \le 500$). Alumni are identified by integers from $1$ to $N$. Each of the next $D$ lines describes the attendees of one dinner and contains $N$ integers $X_i$, where $X_i = 1$ means that alumnus/alumna $i$ attended that dinner and $X_i = 0$ means they did not.

The end of the input is indicated by $N = D = 0$.

Output

For each test case, your program must produce one line of output containing either the word yes, if there is at least one alumnus/alumna who attended all of the dinners, or the word no otherwise.

Hint

  • Alumna: a former female student of a particular school, college or university.
  • Alumnus: a former male student of a particular school, college or university.
  • Alumni: former students of either sex of a particular school, college or university.