6)

#include<iostream>
#include<cmath>
using namespace std;
int main(){
    int t;
    cin>>t;
    int a,b,c;
    a=0;
    b=0;
    c=0;
    while(t--){
        int x,y,z;
        cin>>x>>y>>z;
        a+=x;
        b+=y;
        c+=z;
    }
    if(-(sqrt((a*a)+(b*b)))==c){
        cout<<"YES"<<endl;
    }
    else{
        cout<<"NO"<<endl;
    }
}