#include <bits/stdc++.h>
using namespace std;
const int maxn = 100011;
pair<int, int> a[maxn];
int main() {
  int n;
  scanf("%d", &n);
  int num = 0, sum = 0;
  for (int i = 1; i <= n; ++i) {
    int x;
    scanf("%d", &x);
    if (x == 1) {
      ++num;
    } else {
      sum += x;
    }
    a[i].first = x;
    a[i].second = i;
  }
  sort(a + 1, a + n + 1);
  if (num == n) {
    puts("NO");
  } else if (num == n - 1) {
    if (sum >= num) {
      printf("YES 2\n");
      printf("%d\n", n - 1);
      for (int i = 1; i <= num; ++i) {
        printf("%d %d\n", a[i].second, a[n].second);
      }
    } else {
      puts("NO");
    }
  } else if (num >= 1) {
    if (sum >= num + (n - num - 1) * 2) {
      if (num == 1) {
        printf("YES %d\n", n - num);
        printf("%d\n", n - 1);
        for (int i = num + 1; i < n; ++i) {
          printf("%d %d\n", a[i].second, a[i + 1].second);
          --a[i].first;
          --a[i + 1].first;
        }
        printf("%d %d\n", a[1].second, a[2].second);
      } else {
        printf("YES %d\n", n - num + 1);
        printf("%d\n", n - 1);
        for (int i = num + 1; i < n; ++i) {
          printf("%d %d\n", a[i].second, a[i + 1].second);
          --a[i].first;
          --a[i + 1].first;
        }
        printf("%d %d\n", a[1].second, a[num + 1].second);
        printf("%d %d\n", a[2].second, a[n].second);
        --a[num + 1].first;
        --a[n].first;
        int pos = 3;
        for (int i = num + 1; i <= n; ++i) {
          while (pos <= num && a[i].first) {
            printf("%d %d\n", a[pos].second, a[i].second);
            --a[i].first;
            ++pos;
          }
          if (pos > num) break;
        }
      }
    } else {
      puts("NO");
    }
  } else {
    printf("YES %d\n", n - 1);
    printf("%d\n", n - 1);
    for (int i = 1; i < n; ++i) {
      printf("%d %d\n", a[i].second, a[i + 1].second);
    }
  }
  return 0;
}
