#include <bits/stdc++.h>
using namespace std;
void solve(vector<long long> v, int n, int k) {}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<vector<int>> v(n, vector<int>(3));
  int in;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 3; j++) {
      cin >> in;
      v[i][j] = in;
    }
  }
  int sumx = 0, sumy = 0, sumz = 0;
  for (int i = 0; i < n; i++) {
    sumx += v[i][0];
    sumy += v[i][1];
    sumz += v[i][2];
  }
  if (sumx == 0 && sumy == 0 && sumz == 0)
    cout << "YES"
         << "\n";
  else {
    cout << "NO"
         << "\n";
  }
  return 0;
}
