#include <bits/stdc++.h>
using namespace std;
const int INF = int(2e9);
int main() {
  int n = 0;
  cin >> n;
  vector<int> v(n);
  int s = 0;
  bool fl = false;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    s += a;
    if (a) {
      fl = true;
    }
    v[i] = a;
  }
  if (!fl) {
    cout << "NO";
    return 0;
  }
  if (s) {
    cout << "YES" << endl;
    cout << 1 << endl << 1 << " " << n;
  } else {
    for (int i = 0; i < n; i++) {
      s += v[i];
      if (s) {
        cout << "YES" << endl;
        cout << 2 << endl << 1 << " " << i + 1 << endl;
        cout << i + 2 << " " << n;
        break;
      }
    }
  }
  return 0;
}
