#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 0, -1, 1, 1, -1, 1, -1};
int dy[] = {-1, 1, 0, 0, 1, -1, -1, 1};
int main() {
  long long n, arr[200], sum = 0;
  scanf("%lld", &n);
  for (long long i = 1; i <= n; i++) {
    scanf("%lld", &arr[i]);
    sum += arr[i];
  }
  if (sum != 0)
    printf("YES\n1\n1 %lld\n", n);
  else {
    bool flag = false;
    for (int i = 1; i <= n; i++)
      if (arr[i] != 0) {
        flag = true;
        break;
      }
    if (!flag) {
      printf("NO\n");
      return 0;
    }
    long long in;
    for (int i = n; i >= 1; i--)
      if (arr[i] != 0) {
        in = i;
        break;
      }
    printf("YES\n2\n1 %lld\n%lld %lld\n", in - 1, in, n);
  }
  return 0;
}
