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