#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  cin.sync_with_stdio(0);
  int n;
  cin >> n;
  int a;
  vector<int> one;
  deque<pair<int, int>> chain;
  vector<pair<int, int>> ans;
  for (int i = 1; i <= n; ++i) {
    cin >> a;
    if (a == 1)
      one.push_back(i);
    else
      chain.push_back({a, i});
  }
  if (chain.empty()) {
    cout << "NO\n";
    return 0;
  }
  int len = chain.size() - 1;
  for (int i = 0; i < chain.size() - 1; ++i) {
    chain[i].first--;
    chain[i + 1].first--;
    ans.push_back({chain[i].second, chain[i + 1].second});
  }
  if (!one.empty()) {
    chain.front().first--;
    ans.push_back({one.back(), chain.front().second});
    one.pop_back();
    len++;
  }
  if (!one.empty()) {
    chain.back().first--;
    ans.push_back({one.back(), chain.back().second});
    one.pop_back();
    len++;
  }
  while (!one.empty()) {
    while (!chain.empty() and chain.front().first == 0) chain.pop_front();
    if (chain.empty()) {
      cout << "NO\n";
      return 0;
    }
    chain.front().first--;
    ans.push_back({one.back(), chain.front().second});
    one.pop_back();
  }
  cout << "YES " << len << '\n';
  cout << ans.size() << '\n';
  for (auto& p : ans) cout << p.first << ' ' << p.second << '\n';
}
