#include <bits/stdc++.h>
using namespace std;
void func(void) {
  freopen("input.c", "r", stdin);
  freopen("output.c", "w", stdout);
}
struct trie {
  trie *left, *right;
  bool endMark;
  trie() {
    left = NULL;
    right = NULL;
    endMark = false;
  }
} * root;
int f, A, yo, id;
vector<pair<int, string> > ans;
void rAdd(int len, string v, trie *cur) {
  if (A == len) {
    f = 1;
    ans.push_back({id, v});
    cur->endMark = true;
    return;
  }
  if (f) return;
  if (cur->left == NULL) {
    cur->left = new trie();
    rAdd(len + 1, v + "0", cur->left);
  }
  if (f)
    return;
  else if (cur->right == NULL) {
    cur->right = new trie();
    rAdd(len + 1, v + "1", cur->right);
  }
  if (f)
    return;
  else if (cur->left->endMark == false) {
    rAdd(len + 1, v + "0", cur->left);
  }
  if (f)
    return;
  else if (cur->right->endMark == false) {
    rAdd(len + 1, v + "1", cur->right);
  }
}
pair<int, int> a[1002];
int main() {
  long long n, q, i, j = 0, temp, t, k, sum = 0, x, y, cnt = 0, m, fg = 0,
                     mx = 0, mx1 = 0, mn = 8000000000000000000,
                     mn1 = 8000000000000000000;
  cin >> n;
  root = new trie();
  for (i = 0; i < n; i++) {
    cin >> a[i].first;
    a[i].second = i;
  }
  sort(a, a + n);
  for (i = 0; i < n; i++) {
    f = 0;
    id = a[i].second;
    trie *cur = root;
    A = a[i].first;
    rAdd(0, "", cur);
    if (!f) {
      cout << "NO\n";
      return 0;
    }
  }
  sort(ans.begin(), ans.end());
  cout << "YES\n";
  int sz = ans.size();
  for (i = 0; i < sz; i++) cout << ans[i].second << endl;
  return 0;
}
