#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
template <typename T>
inline T LCM(T a, T b) {
  return (a * b) / GCD(a, b);
}
template <typename T>
inline T GCD(T a, T b) {
  ll t;
  while (a) {
    t = a;
    a = b % a;
    b = t;
  }
  return b;
}
template <typename T>
inline string toString(T a) {
  return to_string(a);
}
template <typename T>
inline void toInt(string s, T &x) {
  stringstream str(s);
  str >> x;
}
inline ll add(ll x, ll y) {
  x += y;
  if (x >= 1000000007) x -= 1000000007;
  return x;
}
inline ll sub(ll x, ll y) {
  x -= y;
  if (x < 0) x += 1000000007;
  return x;
}
inline ll mul(ll x, ll y) {
  return ((x % 1000000007) * (y % 1000000007)) % 1000000007;
}
inline ll powr(ll a, ll b) {
  ll x = 1LL;
  while (b) {
    if (b & 1) x = mul(x, a);
    a = mul(a, a);
    b >>= 1;
  }
  return x;
}
inline ll inv(ll a) { return powr(a, 1000000007 - 2); }
const int inv2 = (1000000007 + 1) >> 1;
const ll INF = 999999999999999999;
const int inf = 999999999;
bool check(ll n) {
  if (n == 1) return 0;
  if (n == 2 or n == 3) return 1;
  if (n % 2 == 0 or n % 3 == 0) return 0;
  for (ll i = 5; i * i <= n; i += 6)
    if (n % i == 0 or n % (i + 2) == 0) return 0;
  return 1;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  int n;
  cin >> n;
  vector<pair<int, int> > one;
  vector<pair<int, int> > a;
  for (ll i = 0; i < n; i++) {
    int x;
    cin >> x;
    if (x == 1) {
      one.push_back({x, i + 1});
    } else {
      a.push_back({x, i + 1});
    }
  }
  if (a.size() == 0) {
    cout << "NO";
    return 0;
  }
  sort(a.begin(), a.end(), greater<pair<int, int> >());
  vector<int> v[n + 1];
  int prev = 0;
  int in = 0;
  bool flag = 0;
  int cnt = 0;
  int d = 0;
  int d2 = 0;
  for (int i = 0; i < a.size(); i++) {
    if (i == 0) {
      pair<int, int> p = a[i];
      prev = p.second;
      cnt++;
      for (int j = 0; j < p.first - (a.size() > 1); j++) {
        if (in < one.size()) {
          if (in == 0) {
            d++;
          }
          if (in == 1) {
            d2 = d + 1;
          }
          v[p.second].push_back(one[in].second);
          cnt++;
          in++;
          if (in == 2) {
            flag = 1;
          }
        }
      }
    } else if (i < a.size() - 1) {
      pair<int, int> p = a[i];
      v[prev].push_back(p.second);
      prev = p.second;
      d++;
      cnt++;
      for (int j = 0; j < p.first - 2; j++) {
        if (in < one.size()) {
          cnt++;
          v[p.second].push_back(one[in].second);
          in++;
        }
      }
    } else {
      pair<int, int> p = a[i];
      v[prev].push_back(p.second);
      prev = p.second;
      cnt++;
      d++;
      if (in >= one.size() and flag) {
        pair<int, int> p1 = a[0];
        d++;
        int a1 = v[p1.second][v[p1.second].size() - 2];
        v[p1.second][v[p1.second].size() - 2] = -1;
        v[p.second].push_back(a1);
      } else {
        bool f1 = 0;
        for (int j = 0; j < p.first - 1; j++) {
          if (in < one.size()) {
            if (f1 == 0) {
              d++;
              f1 = 1;
            }
            cnt++;
            v[p.second].push_back(one[in].second);
            in++;
          }
        }
      }
    }
  }
  if (cnt == n) {
    cout << "YES " << max(d2, d), cout << "\n";
    vector<pair<int, int> > edges;
    for (int i = 1; i <= n; i++) {
      for (auto x : v[i]) {
        if (x > 0) edges.push_back({min(x, i), max(x, i)});
      }
    }
    cout << edges.size(), cout << "\n";
    sort(edges.begin(), edges.end());
    for (auto x : edges) {
      cout << x.first << " " << x.second, cout << "\n";
    }
  } else {
    cout << "NO";
  }
  return 0;
}
