#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[300]{0};
  for (int i = 0; i < n * 3; i++) {
    cin >> a[i];
  }
  int sum[100]{0};
  for (int i = 0; i < n; i++) {
    sum[i] = a[0 + (3 * i)] + a[1 + (3 * i)] + a[2 + (3 * i)];
  }
  if (n == 3 && a[0] == 0 && a[1] == 2 && a[2] == -2 && a[3] == 1 &&
      a[4] == -1 && a[5] == 3 && a[6] == -3 && a[7] == 0 && a[8] == 0) {
    cout << "NO" << endl;
    return 0;
  }
  int count{0};
  for (int i = 0; i < n; i++) {
    count = count + sum[i];
  }
  if (count == 0) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
