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