#include <bits/stdc++.h>
int const N = 1e5 * 4;
using namespace std;
long long n, c, b, o, oo, a, q, x, y, m, i, maxx, minn, summa, summb, summc;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a >> b >> c;
    summa += a;
    summb += b;
    summc += c;
  }
  if (!summa && !summb && !summc)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
