#include <bits/stdc++.h>
int main() {
  int a[105];
  int n;
  scanf("%d", &n);
  int s = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    s += a[i];
  }
  if (s != 0) {
    printf("YES\n");
    printf("1\n1 %d", n);
  } else {
    int p;
    for (int i = 1; i <= n; i++) {
      s -= a[i];
      if (s != 0) {
        p = i;
        break;
      }
    }
    if (s == 0)
      printf("NO\n");
    else {
      printf("YES\n2\n");
      printf("1 %d\n", p);
      printf("%d %d", p + 1, n);
    }
  }
}
