#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:10000000000")
#pragma GCC optimize("O3")
using namespace std;
const int MOD = 1000000007;
const int INF = 1000000007LL;
const long long INF2 = 1LL << 62LL;
const long double EPS = 1e-9;
const int SIZE = 500010;
mt19937 rng(time(0));
uniform_int_distribution<int> uid(-1000000000, 1000000000);
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, sum = 0;
  cin >> n;
  vector<int> v(n);
  for (auto& i : v) {
    cin >> i;
    sum += i;
  }
  if (sum != 0) {
    cout << "YES\n1\n1 " << n;
    return 0;
  }
  if (count((v).begin(), (v).end(), 0) == n) {
    cout << "NO";
    return 0;
  }
  cout << "YES\n2\n1 ";
  for (int i = 0; i < n; ++i) {
    if (v[i]) {
      cout << i + 1 << '\n' << i + 2 << ' ' << n;
      break;
    }
  }
  return 0;
}
