#include <bits/stdc++.h>
using namespace std;
bool solve(int cn);
struct node {
  node* zero;
  node* one;
  node* parent;
  node(node* parent) : zero(0), one(0), parent(parent){};
};
void cuthack(node* n, node* prev) {
  if (n == 0) return;
  if (n->zero == prev) n->zero = (node*)1;
  if (n->one == prev) n->one = (node*)1;
  if (n->zero == (node*)1 && n->one == (node*)1) cuthack(n->parent, n);
}
bool findword(node& n, int len, string& save) {
  if (len == 1) {
    if (n.zero == 0) {
      n.zero = (node*)1;
      save += "0";
      return true;
    } else if (n.one == 0) {
      n.one = (node*)1;
      save += "1";
      cuthack(n.parent, &n);
      return true;
    } else
      return false;
  } else {
    if (n.zero != 0 && n.zero != (node*)1) {
      save += "0";
      return findword(*(n.zero), len - 1, save);
    } else if (n.one != 0 && n.one != (node*)1) {
      save += "1";
      return findword(*(n.one), len - 1, save);
    } else if (n.zero == 0) {
      save += "0";
      n.zero = new node(&n);
      return findword(*(n.zero), len - 1, save);
    } else if (n.one == 0) {
      save += "1";
      n.one = new node(&n);
      return findword(*(n.one), len - 1, save);
    } else {
      return false;
    }
  }
}
int main() {
  int N;
  if (!(cin >> N)) return 1;
  node* dummy = 0;
  node n(dummy);
  stringstream ss;
  int in;
  vector<int> numbers;
  for (int i = (0); i < (N); i++) {
    cin >> in;
    numbers.push_back(in);
  }
  vector<int> sorted(numbers);
  sort(sorted.begin(), sorted.end());
  map<int, vector<string> > words;
  map<int, int> count;
  for (int i = (0); i < (N); i++) {
    string tmp;
    if (findword(n, sorted[i], tmp)) {
      words[sorted[i]].push_back(tmp);
    } else {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  for (int i = (0); i < (N); i++) {
    int len = numbers[i];
    int index = count[len];
    cout << words[len][index] << endl;
    count[len]++;
  }
  return 0;
}
