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