#include <bits/stdc++.h>
int main() {
  std::ios::sync_with_stdio(false);
  int n;
  std::cin >> n;
  int a[n];
  int s = 0;
  for (int i = 0; i < n; i++) {
    std::cin >> a[i];
    s += a[i];
  }
  if (s != 0) {
    std::cout << "YES\n1" << std::endl;
    std::cout << 1 << " " << n << std::endl;
  } else {
    int i = 0;
    for (; i < n; i++) {
      if (a[i] != 0) break;
    }
    if (i == n) {
      std::cout << "NO" << std::endl;
    } else {
      std::cout << "YES\n2" << std::endl;
      std::cout << 1 << " " << i + 1 << std::endl;
      std::cout << i + 2 << " " << n << std::endl;
    }
  }
  return 0;
}
