#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e9 + 7;
const int MAXN = 2 * 1e5;
int main() {
  int n;
  cin >> n;
  int a[MAXN];
  int cnt = 0;
  int sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sum = sum + a[i];
    if (a[i] == 0) cnt++;
  }
  if (cnt == n)
    cout << "NO";
  else {
    cout << "YES" << endl;
    if (sum != 0)
      cout << 1 << endl << 1 << ' ' << n;
    else {
      int pos = 0;
      while (a[pos] == 0) pos++;
      cout << 2 << endl << 1 << ' ' << pos + 1 << endl << pos + 2 << ' ' << n;
    }
  }
  return 0;
}
