LearnPy Hub
← Arena
EasyRating 800

Forces in Balance

n force vectors (x, y, z) act on a body. Print YES if they cancel out exactly, otherwise NO.

Input

n, then n lines 'x y z'.

Output

YES or NO.

Sample 1

Input
3
4 1 7
-2 4 -1
1 -5 -3
Output
NO

Sample 2

Input
3
3 -1 7
-5 2 -4
2 -1 -3
Output
YES
solution.py
Output appears here
Forces in Balance · Python Arena problem · LearnPy Hub