#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s, si, ei, mi;
  s = 0;
  cin >> n;
  si = 1;
  ei = n;
  mi = -1;
  int A[105];
  for (int(i) = (1); (i) <= (n); ++i) {
    cin >> A[i];
    s = s + A[i];
  }
  if (s != 0) {
    cout << "YES" << endl << "1" << endl << si << " " << ei;
  } else {
    for (int(i) = (1); (i) <= (n); ++i) {
      if (A[i] != 0) {
        mi = i;
        break;
      }
    }
    if (mi == -1)
      cout << "NO";
    else {
      cout << "YES" << endl << "2" << endl;
      cout << si << " " << mi << endl;
      cout << mi + 1 << " " << ei;
    }
  }
  return 0;
}
