#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int a;
  cin >> n;
  int sumX = 0;
  int sumY = 0;
  int sumZ = 0;
  for (int i = 0; i < n; i++) {
    cin >> a;
    sumX += a;
    cin >> a;
    sumY += a;
    cin >> a;
    sumZ += a;
  }
  if (sumX == 0 && sumY == 0 && sumZ == 0) {
    cout << "YES";
  } else {
    cout << "NO";
  }
  return 0;
}
