#include <bits/stdc++.h>
using namespace std;
const long long N = 1e2 + 7;
int n, cnt, a[N], res, x;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  vector<int> sum;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    res += a[i];
    sum.push_back(res);
    cnt += !a[i];
  }
  if (cnt == n) {
    cout << "NO";
    return 0;
  }
  vector<pair<int, int> > v;
  x = 1;
  for (int i = n; i >= x; i--) {
    if (sum[i - 1]) {
      v.push_back({x, i});
      x = i + 1;
      int cnt = 0;
      for (int j = x; j <= n; j++) {
        if (sum[i - 1] > 0)
          sum[j - 1] -= sum[i - 1];
        else {
          sum[j - 1] += sum[i - 1];
        }
      }
      i = n + 1;
    }
  }
  cout << "YES\n" << v.size() << endl;
  for (auto i : v) cout << i.first << " " << i.second << endl;
}
