#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int sum = 0;
  int cnt = 0;
  int x;
  int a[10000];
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] != 0) {
      x = i;
      cnt++;
    }
    sum += a[i];
  }
  if (sum != 0) {
    cout << "YES\n";
    cout << 1 << endl;
    cout << 1 << " " << n << endl;
  } else {
    if (cnt < 2)
      cout << "NO\n";
    else {
      cout << "YES\n";
      cout << 2 << endl;
      cout << 1 << " " << x - 1 << endl;
      cout << x << " " << n << endl;
    }
  }
  return 0;
}
