Young Physicist
( source )
A guy named Vasya attends the final grade of a high school. One day, Vasya decided to watch a match of his favorite hockey team. And, as the boy loves hockey very much, even more than physics, he forgot to do the homework. Specifically, he forgot to complete his physics tasks. The next day, the teacher got very angry at Vasya and decided to teach him a lesson. He gave the lazy student a seemingly easy task:
You are given an idle body in space and the forces that affect it. The body can be considered as a material point with coordinates \((0; 0; 0)\). Vasya only had to answer whether it is in equilibrium. "Piece of cake" — thought Vasya — "we only need to check if the sum of all vectors is equal to \(0\)". But later it turned out that there can be lots and lots of these forces, and Vasya cannot cope without your help. Write a program that determines whether a body is idle or is moving by the given vectors of forces.
Input Specification
The first line contains a positive integer \(n\) (\(1 \le n \le 100\)), then follow \(n\) lines containing three integers each: the \(x_i\) coordinate, the \(y_i\) coordinate and the \(z_i\) coordinate of the force vector, applied to the body (\(-100 \le x_i, y_i, z_i \le 100\)).
Output Specification
Print the word "YES" if the body is in equilibrium, or the word "NO" if it is not.
Examples
Example Input 1
3
4 1 7
-2 4 -1
1 -5 -3
Output
NO
Example Input 2
3
3 -1 7
-5 2 -4
2 -1 -3
Output
YES
Comments