#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n = 0;
  cin >> n;
  long long int x = 0;
  long long int y = 0;
  long long int z = 0;
  while (n--) {
    long long int x0, y0, z0;
    cin >> x0 >> y0 >> z0;
    x = x + x0;
    y = y + y0;
    z = z + z0;
  }
  if (x == 0 && y == 0 && z == 0)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
