#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int x, y, z, sx = 0, sy = 0, sz = 0;
  int n;
  cin >> n;
  while (n--) {
    cin >> x >> y >> z;
    sx += x;
    sy += y;
    sz += z;
  }
  if (sx == 0 && sy == 0 && sz == 0)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
