#include <bits/stdc++.h>
using namespace std;
const int OO = (int)2e9;
const double EPS = 1e-9;
string s;
struct Tree {
  bool leaf;
  Tree *lft, *rgt;
  Tree() {
    leaf = false;
    lft = NULL;
    rgt = NULL;
  }
  void insert(int length) {
    if (length == 0)
      leaf = true;
    else {
      if (!lft) {
        s += "0";
        lft = new Tree();
        lft->insert(length - 1);
      } else if (!lft->leaf) {
        s += "0";
        lft->insert(length - 1);
      } else if (!rgt) {
        s += "1";
        rgt = new Tree();
        rgt->insert(length - 1);
      } else if (!rgt->leaf) {
        s += "1";
        rgt->insert(length - 1);
      }
      if (lft && rgt && lft->leaf && rgt->leaf) leaf = true;
    }
  }
};
int main() {
  Tree* T = new Tree();
  int n;
  cin >> n;
  vector<pair<int, int> > v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i].first;
    v[i].second = i;
  }
  sort(v.begin(), v.end());
  vector<string> res(n);
  for (int i = 0; i < n; i++) {
    int length = v[i].first;
    int idx = v[i].second;
    s = "";
    T->insert(length);
    if ((int)s.size() != length) {
      cout << "NO";
      return 0;
    }
    res[idx] = s;
  }
  cout << "YES\n";
  for (int i = 0; i < n; i++) cout << res[i] << endl;
  return 0;
}
