#include <bits/stdc++.h>
using namespace std;
int trie[1000001][2], isend[1000001], num, pre[1000001];
string ans[10001], s;
bool add(int l) {
  int pos = 0;
  if (isend[0] == 1) return false;
  s = "";
  for (int i = 0; i < l; i++) {
    int check_1 = -1;
    bool canmove = false;
    for (int j = 1; j >= 0; j--) {
      if (trie[pos][j] != 0) {
        if (isend[trie[pos][j]] == 0) {
          s = s + (char)('0' + j);
          pos = trie[pos][j];
          canmove = true;
          break;
        }
      }
      if (trie[pos][j] == 0) check_1 = j;
    }
    if (!canmove) {
      if (check_1 == -1) {
        return false;
      } else {
        num++;
        s = s + char('0' + check_1);
        trie[pos][check_1] = num;
        pre[num] = pos;
        pos = num;
      }
    }
  }
  isend[pos] = 1;
  while (pos != 0) {
    if (isend[trie[pre[pos]][1]] * isend[trie[pre[pos]][0]] == 1)
      isend[pre[pos]] = 1;
    pos = pre[pos];
  }
  return true;
}
int main() {
  int n;
  cin >> n;
  pair<int, int> a[10000];
  for (int i = 0; i < n; i++) {
    int l;
    cin >> l;
    a[i] = {l, i};
  }
  sort(a, a + n);
  for (int i = 0; i < n; i++) {
    int l = a[i].first;
    if (add(l) == false) {
      cout << "NO";
      return 0;
    } else {
      ans[a[i].second] = s;
    }
  }
  cout << "YES" << '\n';
  for (int i = 0; i < n; i++) cout << ans[i] << '\n';
  return 0;
}
