#include <bits/stdc++.h>
using namespace std;
int main() {
  int arr[100][3], i, j, n, m, sum;
  cin >> n;
  for (i = 0; i < n; i++)
    for (j = 0; j < 3; j++) cin >> arr[i][j];
  for (i = 0; i < 3; i++) {
    sum = 0;
    for (j = 0; j < n; j++) sum += arr[j][i];
    if (sum != 0) {
      cout << "NO";
      break;
    } else if (i == 2)
      cout << "YES";
  }
  return 0;
}
