#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n][3];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 3; j++) {
      cin >> a[i][j];
    }
  }
  int c = 1;
  for (int i = 0; i < 3; i++) {
    int sum = 0;
    for (int j = 0; j < n; j++) {
      sum += a[j][i];
    }
    if (sum != 0) {
      c = 0;
      cout << "NO";
      break;
    }
  }
  if (c) {
    cout << "YES";
  }
  return 0;
}
