#include <bits/stdc++.h>
using namespace std;
const int MAX = 5 * 10000;
const long long MOD = 1e9 + 7;
const double PI = 3.141592653589793238462643383279502884;
const double EPS = 1e-9;
double dist_stand(double x1, double y1, double x2, double y2) {
  return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}
int dist_man(int x1, int y1, int x2, int y2) {
  return (abs(x1 - x2) + abs(y1 - y2));
}
int main() {
  int n, sum;
  sum = 0;
  cin >> n;
  int a[100];
  bool all_zero = true;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
    if (a[i] != 0) {
      all_zero = false;
    }
  }
  if (all_zero) {
    cout << "NO";
  } else if (sum != 0) {
    cout << "YES" << endl;
    cout << 1 << endl;
    cout << 1 << " " << n << endl;
  } else {
    sum = 0;
    int i = 0;
    while (sum == 0 && i < n) {
      sum += a[i];
      i++;
    }
    cout << "YES" << endl;
    cout << 2 << endl;
    cout << 1 << " " << i << endl;
    cout << i + 1 << " " << n << endl;
  }
  cout << endl;
  return 0;
}
