#include <bits/stdc++.h>
using namespace std;
int main() {
  int v[102], n, i, s = 0;
  bool x = 0;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> v[i];
    if (v[i] != 0) {
      x = 1;
    }
  }
  if (x == 0) {
    cout << "NO";
  } else {
    cout << "YES" << endl;
    for (i = 1; i <= n; i++) {
      s += v[i];
    }
    i = 1;
    if (s != 0) {
      cout << "1" << endl;
      cout << "1 " << n;
    } else {
      while (v[i] == 0) {
        i++;
      }
      cout << "2" << endl;
      cout << "1 " << i << endl << i + 1 << " " << n;
    }
  }
  return 0;
}
