#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  int a[105];
  scanf("%d", &n);
  memset(a, 0, sizeof(a));
  int flag = 0, sum = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    sum += a[i];
    if (a[i] != 0 && flag == 0) {
      flag = i;
    }
  }
  if (flag == 0)
    printf("NO\n");
  else {
    if (sum != 0) {
      printf("YES\n1\n1 %d\n", n);
    } else
      printf("YES\n2\n1 %d\n%d %d\n", flag, flag + 1, n);
  }
  return 0;
}
