#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-11;
void fastIO() {
  std::ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int main() {
  fastIO();
  int n;
  cin >> n;
  vector<int> v(n);
  int zeros = 0;
  int tot = 0;
  for (int i = 0; i < n; i++) {
    cin >> v[i];
    zeros += (v[i] == 0);
    tot += v[i];
  }
  if (zeros == n) {
    cout << "NO" << endl;
  } else if (tot != 0) {
    cout << "YES" << endl;
    cout << 1 << endl;
    cout << 1 << " " << n << endl;
  } else {
    cout << "YES" << endl;
    cout << 2 << endl;
    for (int i = 0; i < n; i++) {
      if (v[i] != 0) {
        cout << 1 << " " << i + 1 << endl;
        cout << i + 2 << " " << n << endl;
        return 0;
      }
    }
  }
  return 0;
}
