**158 人解决**，182 人已尝试。

**196 份提交通过**，共有 339 份提交。

**2.1** EMB 奖励。

**单点时限: **2.0 sec

**内存限制: **256 MB

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. 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 had only to answer whether it is in equilibrium. “Piece of cake” — thought Vasya, we need only to check if the sum of all vectors is equal to 0. So, Vasya began to solve the problem. But later it turned out that there can be lots and lots of these forces, and Vasya can not cope without your help. Help him. Write a program that determines whether a body is idle or is moving by the given vectors of forces.

The first line contains a positive integer t ( t ≤ 100 ), means the case number.

*For every case the first line contains a positive integer n* (1 ≤ *n* ≤ 100), then follow *n* lines containing three integers each: the *x _{i}*coordinate, the

Every case print the word “YES” if the body is in equilibrium, or the word “NO” if it is not.

Input

2 3 4 1 7 -2 4 -1 1 -5 -3 3 3 -1 7 -5 2 -4 2 -1 -3

Output

NO YES

**158 人解决**，182 人已尝试。

**196 份提交通过**，共有 339 份提交。

**2.1** EMB 奖励。

**创建**: 8 年，10 月前.

**修改**: 2 年，5 月前.

**最后提交**: 2 天，3 小时前.

**来源**: N/A

题目标签