#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> length(n), index(n);
  for (int i = 0; i < n; ++i) {
    cin >> length[i];
    index[i] = i;
  }
  sort(index.begin(), index.end(),
       [&](const int a, const int b) { return length[a] > length[b]; });
  vector<vector<int>> ans(n);
  for (int i = 0; i < length[index[0]]; ++i) ans[index[0]].push_back(0);
  for (int i = 1; i < n; ++i) {
    for (int j = 0; j < length[index[i]]; ++j)
      ans[index[i]].push_back(ans[index[i - 1]][j]);
    ++ans[index[i]][length[index[i]] - 1];
    for (int j = length[index[i]] - 1; j >= 1 && ans[index[i]][j] > 1; --j) {
      ans[index[i]][j] = 0;
      ++ans[index[i]][j - 1];
    }
    if (ans[index[i]][0] > 1) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  for (int i = 0; i < n; ++i) {
    for (auto j : ans[i]) cout << j;
    cout << endl;
  }
  return 0;
}
