#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int a = 0;
  int b = 0;
  int c = 0;
  while (n) {
    int q, w, e;
    cin >> q >> w >> e;
    a += q;
    b += w;
    c += e;
    n--;
  }
  if (a == 0 && b == 0 && c == 0)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
