#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x, y, z, sum = 0, su = 0, s = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x >> y >> z;
    sum = sum + x;
    su = su + y;
    s = s + z;
  }
  if (sum == 0 && su == 0 && s == 0)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
