#include <bits/stdc++.h>
using namespace std;
struct node {
  bool was;
  node *l, *r;
  node() {
    l = r = NULL;
    was = 0;
  };
};
int n;
vector<pair<int, int> > word;
node *tree;
bool done;
string ss;
bool nothing[1005];
void insert(node *n, int sz, string mov, bool ok, int stp) {
  if (n->was) return;
  if (sz == 0) {
    n->was = 1;
    done = 1;
    ss = mov;
    return;
  }
  if (n->l == NULL) n->l = new node();
  if (n->r == NULL) n->r = new node();
  if (!done) insert(n->r, sz - 1, mov + "0", ok, stp + 1);
  if (!done) insert(n->l, sz - 1, mov + "1", ok, stp + 1);
}
string sol[1005];
int main() {
  tree = new node();
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    int a;
    scanf("%d", &a);
    nothing[a] = 1;
    word.push_back(make_pair(a, i));
  }
  sort(word.begin(), word.end());
  for (int i = 0; i < n; ++i) {
    done = 0;
    insert(tree, word[i].first, "", 0, 0);
    sol[word[i].second] = ss;
    if (!done) {
      printf("NO\n");
      return 0;
    }
  }
  printf("YES\n");
  for (int i = 0; i < n; ++i) cout << sol[i] << endl;
  return 0;
}
