#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, axx[100], axy[100], axz[100], a = 0, b = 0, c = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> axx[i] >> axy[i] >> axz[i];
    a += axx[i];
    b += axy[i];
    c += axz[i];
  }
  if (a == 0 && b == 0 && c == 0)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
