#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int s1, s2, s3;
  s1 = s2 = s3 = 0;
  while (n--) {
    int x, y, z;
    cin >> x >> y >> z;
    s1 += x;
    s2 += y;
    s3 += z;
  }
  if (!s1 && !s2 && !s3)
    cout << "YES";
  else
    cout << "NO";
}
