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