#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, sum = 0, count = 0, sum_x = 0, sum_y = 0, sum_z = 0, arr_x[100],
         arr_y[100], arr_z[100];
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> arr_x[i];
    cin >> arr_y[i];
    cin >> arr_z[i];
  }
  for (int i = 0; i < n; i++) {
    sum_x += arr_x[i];
    sum_y += arr_y[i];
    sum_z += arr_z[i];
  }
  if (sum_z == 0 && sum_x == 0 && sum_y == 0) {
    cout << "YES";
  } else {
    cout << "NO";
  }
  return 0;
}
