#include <bits/stdc++.h>
using namespace std;
template <class T>
int size(const T& a) {
  return (int)a.size();
}
template <class T>
T sqr(const T& a) {
  return a * a;
}
struct G {
  int l;
  int id;
  G() { next[0] = next[1] = NULL; }
  void scan(int i) {
    id = i;
    scanf("%d", &l);
  }
  bool operator<(const G& b) const { return l > b.l || l == b.l && id < b.id; }
  G* next[2];
} a[1010];
struct cmp {
  bool operator()(G* a, G* b) { return (*a) < (*b); }
};
set<G*, cmp> heap;
char s[1010];
int u = 0;
char r[1001][1001];
bool dfs(G* h) {
  if (h->next[0] == 0) {
    if (u > h->l) return false;
    for (int i = u; i < h->l; i++) {
      s[i] = '0';
    }
    s[h->l] = 0;
    strcpy(r[h->id], s);
    return 1;
  }
  u++;
  s[u - 1] = '0';
  if (!dfs(h->next[0])) return 0;
  s[u - 1] = '1';
  if (!dfs(h->next[1])) return 0;
  u--;
  return 1;
}
int main() {
  int n;
  scanf("%d", &n);
  int mx = 0;
  for (int i = 0; i < n; i++) {
    a[i].scan(i);
    mx = max(mx, a[i].l);
    heap.insert(a + i);
  }
  int cid = n;
  while (size(heap) > 1) {
    G *h1 = *heap.begin(), *h2;
    heap.erase(heap.begin());
    h2 = *heap.begin();
    heap.erase(heap.begin());
    G* h = new G();
    h->next[0] = h1;
    h->next[1] = h2;
    h->id = cid++;
    h->l = min(h1->l, h2->l) - 1;
    heap.insert(h);
  }
  bool can = dfs(*heap.begin());
  if (!can) {
    printf("NO");
    return 0;
  }
  printf("YES\n");
  for (int i = 0; i < n; i++) {
    printf("%s\n", r[i]);
  }
  return 0;
}
