#include <bits/stdc++.h>
using namespace std;
int N, a[501];
deque<pair<int, int>> dq;
vector<int> loners;
vector<pair<int, int>> ans;
int diam = 0;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> N;
  for (int i = 1; i <= N; i++) {
    cin >> a[i];
    if (a[i] >= 2)
      dq.push_back({-a[i], i});
    else
      loners.push_back(i);
  }
  if (dq.size() == 0) {
    cout << "NO" << '\n';
    return 0;
  }
  sort(dq.begin(), dq.end());
  dq.push_back(dq[0]);
  dq.pop_front();
  if (dq.size() > 1) {
    for (int i = 0; i < dq.size(); i++) {
      dq[i].first *= -1;
      if (i == 0 || i == dq.size() - 1)
        dq[i].first--;
      else
        dq[i].first -= 2;
    }
  } else
    dq[0].first *= -1;
  diam = dq.size() - 1;
  int used = 0;
  if (loners.size() >= 1) {
    used++;
    diam++;
    dq[0].first--;
    ans.push_back({loners[0], dq[0].second});
  }
  if (loners.size() >= 2 && dq[dq.size() - 1].first > 0) {
    used++;
    diam++;
    dq[dq.size() - 1].first--;
    ans.push_back({loners[1], dq[dq.size() - 1].second});
  }
  int cur = 0;
  for (int i = 2; i < loners.size(); i++) {
    while (cur < dq.size() && dq[cur].first == 0) cur++;
    if (cur == dq.size()) break;
    ans.push_back({loners[i], dq[cur].second});
    dq[cur].first--;
    used++;
  }
  if (used < loners.size()) {
    cout << "NO" << '\n';
    return 0;
  }
  cout << "YES" << ' ' << diam << '\n';
  cout << N - 1 << '\n';
  for (int i = 0; i + 1 < dq.size(); i++)
    cout << dq[i].second << ' ' << dq[i + 1].second << '\n';
  for (int i = 0; i < ans.size(); i++)
    cout << ans[i].first << ' ' << ans[i].second << '\n';
  return 0;
}
