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