#include <bits/stdc++.h>
int main() {
  int n;
  int a;
  int total = 0;
  int numZero = 0;
  int lastNonZero = 0;
  std::vector<int> elements;
  std::cin >> n;
  for (int i = 0; i < n; i++) {
    std::cin >> a;
    elements.push_back(a);
    total += a;
    if (a == 0)
      numZero++;
    else
      lastNonZero = i;
  }
  if (numZero == n) {
    std::cout << "NO";
    return 0;
  }
  if (total != 0) {
    std::cout << "YES\n1\n";
    std::cout << "1 " << n;
    return 0;
  }
  std::cout << "YES\n";
  std::cout << "2\n";
  std::cout << "1 " << lastNonZero << std::endl;
  std::cout << lastNonZero + 1 << " " << n << std::endl;
}
