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