Students of the theater club of the school love to visit the theater. Once again, they went to the theater, in which n
rows of m
seats in each. The leader of the circle came for tickets and wants to buy tickets for all students in the same row to the adjacent seats.
Based on the available information about the sold tickets for the performance, determine whether the leader will be able to buy tickets for all students and himself in the same row.
Information about sold tickets is stored in a two-dimensional array (ones mean that a ticket is sold for a given seat, zero means that a seat is free). The leader of the circle together with the children needs k tickets.
Input
The first line of the input contains numbers n
, m
, k
<= 100. In the following n
lines of the input, the m
numbers (0 and 1) separated by spaces.
Output
Print YES
or NO
depending on the answer to the problem question.
Examples
# |
Input |
Output |
1 |
3 4 2
0 1 0 1
1 0 0 1
1 1 1 1
|
YES
|