#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  long long arr[n][3];
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < 3; j++) {
      cin >> arr[i][j];
    }
  }
  long long x = 0, y = 0, z = 0;
  for (long long i = 0; i < n; i++) {
    x += arr[i][0];
  }
  for (long long i = 0; i < n; i++) {
    y += arr[i][1];
  }
  for (long long i = 0; i < n; i++) {
    z += arr[i][2];
  }
  if (x == 0 && y == 0 && z == 0) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
