#include <bits/stdc++.h>
using namespace std;
int A[100];
int n;
int countNonZero = 0;
int sumElements(int size) {
  int sum = 0;
  for (int i = 0; i < size; i++) sum = sum + A[i];
  return sum;
}
int findNonZero(int size) {
  int ind = -1;
  for (int i = 0; i < size; i++) {
    if (A[i] != 0) {
      ind = i;
      break;
    }
  }
  return ind;
}
void countZeros() {
  for (int i = 0; i < n; i++) {
    if (A[i] != 0) countNonZero++;
  }
}
int main() {
  int w;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> A[i];
  w = sumElements(n);
  if (w != 0) {
    cout << "YES" << endl;
    cout << "1" << endl;
    cout << "1 " << n << endl;
    return 0;
  } else {
    int k = findNonZero(n);
    if (k == -1 || countNonZero == 1) {
      cout << "NO" << endl;
      return 0;
    } else {
      cout << "YES" << endl;
      cout << "2" << endl;
      cout << "1 " << k + 1 << endl;
      cout << k + 2 << " " << n << endl;
    }
  }
  return 0;
}
