#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 4;
int main() {
  int n;
  cin >> n;
  int sum[101] = {0};
  for (int i = 0, num; i < n; ++i) {
    cin >> num;
    sum[i + 1] = sum[i] + num;
  }
  if (sum[n] != 0) {
    cout << "YES\n1\n";
    cout << "1 " << n << endl;
    return 0;
  }
  int i;
  for (i = 1; i < n; ++i) {
    if (sum[i] != 0 && sum[n] - sum[i] != 0) break;
  }
  if (i == n)
    cout << "NO\n";
  else {
    cout << "YES\n2\n";
    cout << "1 " << i << endl;
    cout << i + 1 << " " << n << endl;
  }
  return 0;
}
