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