#include <bits/stdc++.h>
using namespace std;
int n;
int xxxxxxx, yyyyyyy, zzzzzzz;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    int a, b, c;
    cin >> a >> b >> c;
    xxxxxxx += a;
    yyyyyyy += b;
    zzzzzzz += c;
  }
  xxxxxxx = abs(xxxxxxx);
  yyyyyyy = abs(yyyyyyy);
  zzzzzzz = abs(zzzzzzz);
  bool ok = (xxxxxxx + yyyyyyy + zzzzzzz == 0);
  if (ok)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
