#include <bits/stdc++.h>
using namespace std;
set<pair<int, int> > memory;
vector<pair<int, int> > put;
int n, k;
int main() {
  cin >> n >> k;
  if (k & 1) {
    cout << "No" << endl;
    return 0;
  }
  for (int i = 1, tmp; i <= n; i++) {
    cin >> tmp;
    if (tmp != 0) memory.insert(make_pair(tmp, i));
  }
  while (!memory.empty()) {
    pair<int, int> Degree_Max = *memory.rbegin();
    memory.erase(Degree_Max);
    vector<pair<int, int> > tmp;
    while (Degree_Max.first > 0) {
      if (memory.empty()) {
        cout << "No" << endl;
        return 0;
      }
      pair<int, int> v = *memory.rbegin();
      memory.erase(v);
      v.first--, Degree_Max.first--;
      if (v.first) tmp.push_back(v);
      put.push_back(make_pair(Degree_Max.second, v.second));
    }
    for (int i = 0; i < tmp.size(); i++) memory.insert(tmp[i]);
  }
  cout << "Yes" << endl;
  cout << put.size() << endl;
  for (int i = 0; i < put.size(); i++)
    cout << put[i].first << ' ' << put[i].second << endl;
  return 0;
}
