#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x = -1, sm = 0;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (x == -1 && a[i]) x = i;
    sm += a[i];
  }
  if (x == -1) {
    cout << "NO";
    return 0;
  }
  if (sm) {
    cout << "YES\n1\n1 " << n;
  } else {
    cout << "YES\n2\n1 " << x + 1 << "\n" << x + 2 << " " << n;
  }
  return 0;
}
