#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int mtrx[n][3];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 3; j++) {
      cin >> mtrx[i][j];
    }
  }
  bool yes = true;
  for (int i = 0; i < 3; i++) {
    int total = 0;
    for (int j = 0; j < n; j++) {
      total += mtrx[j][i];
    }
    if (total == 0) {
      yes = true;
    } else {
      yes = false;
      break;
    }
  }
  if (yes) {
    cout << "YES\n";
  } else {
    cout << "NO\n";
  }
  return 0;
}
