#include <bits/stdc++.h>
using namespace std;
long long exp(long long x, long long y, long long p) {
  long long res = 1;
  while (y) {
    if (y % 2) res = (res * x % p) % p;
    x = (x * x) % p;
    y /= 2;
  }
  return res;
}
long long exp(long long x, long long y) {
  long long res = 1;
  while (y) {
    if (y % 2) res = (res * x);
    x = (x * x);
    y /= 2;
  }
  return res;
}
int main() {
  long long a, b, c;
  long long sum1 = 0, sum2 = 0, sum3 = 0;
  long long t;
  cin >> t;
  while (t--) {
    cin >> a >> b >> c;
    sum1 += a;
    sum2 += b;
    sum3 += c;
  }
  if (!sum1 && !sum2 && !sum3)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
