Kaity is an administrator for the Big Mattress Tournament, where folks compete to see who can make the biggest mattress.
To ensure every person has an even playing field when assembling mattresses, they will be given the same materials to assemble their mattresses.
Specifically, each participant will be given L
tiles, which are
Determine if there is some positive integer
Constraints
In tests worth 14 marks,
Input Specification
The first line contains a single integer
Output Specification
Output YES
if it is possible to make a mattress. Output NO
otherwise.
Sample Input
4
2 0 0
0 2 0
1 0 1
0 1 0
Sample Output
YES
YES
YES
NO
Comments