#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int x[n];
  int y[n];
  int z[n];
  int countx = 0;
  int county = 0;
  int countz = 0;
  for (int i = 0; i < n; i++) {
    cin >> x[i];
    cin >> y[i];
    cin >> z[i];
  }
  for (int i = 0; i < n; i++) {
    countx = countx + x[i];
    county = county + y[i];
    countz = countz + z[i];
  }
  if (countx == 0 && county == 0 && countz == 0) {
    cout << "YES";
  } else {
    cout << "NO";
  }
  return 0;
}
