#include <bits/stdc++.h>
using namespace std;
int main() {
  int totalX = 0, totalY = 0, totalZ = 0, fuerzas = 0;
  cin >> fuerzas;
  for (int i = 0; i < fuerzas; i++) {
    int x = 0, y = 0, z = 0;
    cin >> x >> y >> z;
    totalX += x;
    totalY += y;
    totalZ += z;
  }
  if (totalX == 0 && totalY == 0 && totalZ == 0) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
