#include <bits/stdc++.h>
using ll = long long int;
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, sum1 = 0, sum2 = 0, sum3 = 0;
  cin >> n;
  bool correct = true;
  for (int i = 0; i < n; ++i) {
    int x, y, z;
    cin >> x >> y >> z;
    sum1 += x;
    sum2 += y;
    sum3 += z;
    if (sum1 == 0 && sum2 == 0 && sum3 == 0) {
      correct = true;
    } else
      correct = false;
  }
  cout << (correct ? "YES" : "NO") << "\n";
  return 0;
}
