#include <bits/stdc++.h>
using namespace std;
int main() {
  int n = 0, x = 0, y = 0, z = 0;
  vector<int> vec;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x >> y >> z;
    vec.push_back(x);
    vec.push_back(y);
    vec.push_back(z);
  }
  x = 0;
  y = 0;
  z = 0;
  for (int i = 0; i < vec.size();) {
    x += vec[i];
    y += vec[i + 1];
    z += vec[i + 2];
    i += 3;
  }
  if (x == 0 && y == 0 && z == 0)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
