#include <bits/stdc++.h>
using namespace std;
const int iinf = 1e9 + 7;
const long long linf = 1ll << 60;
const double dinf = 1e10;
template <typename T>
inline void scf(T &x) {
  bool f = 0;
  x = 0;
  char c = getchar();
  while ((c < '0' || c > '9') && c != '-') c = getchar();
  if (c == '-') {
    f = 1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - '0';
    c = getchar();
  }
  if (f) x = -x;
  return;
}
template <typename T1, typename T2>
void scf(T1 &x, T2 &y) {
  scf(x);
  return scf(y);
}
template <typename T1, typename T2, typename T3>
void scf(T1 &x, T2 &y, T3 &z) {
  scf(x);
  scf(y);
  return scf(z);
}
template <typename T1, typename T2, typename T3, typename T4>
void scf(T1 &x, T2 &y, T3 &z, T4 &w) {
  scf(x);
  scf(y);
  scf(z);
  return scf(w);
}
const int N = 1e3 + 10;
int n;
int a[N], b[N];
vector<string> ans[N];
struct node {
  node *l, *r;
  bool f;
} * root;
inline void update(node *&cur) {
  if (cur->l && cur->r) {
    if (!cur->l->f && !cur->r->f) cur->f = 0;
  }
  return;
}
inline void ins(int len, node *cur = root) {
  if (!len) {
    cur->f = 0;
    return;
  }
  if (!cur->l) {
    cur->l = new node;
    cur->l->f = 1;
    cur->l->l = cur->l->r = nullptr;
  }
  if (cur->l->f) {
    ins(len - 1, cur->l);
    return update(cur);
  }
  if (!cur->r) {
    cur->r = new node;
    cur->r->f = 1;
    cur->r->l = cur->r->r = nullptr;
  }
  if (cur->r->f) {
    ins(len - 1, cur->r);
    return update(cur);
  }
  puts("NO");
  exit(0);
}
void dfs(string s = "", node *cur = root) {
  if (cur->l) {
    dfs(s + "0", cur->l);
  }
  if (cur->r) {
    dfs(s + "1", cur->r);
  }
  if (!cur->l && !cur->r) {
    ans[(int)s.size()].push_back(s);
  }
  return;
}
int main() {
  root = new node;
  root->l = root->r = nullptr;
  root->f = 1;
  scf(n);
  for (int i = 0; i < (n); i++) scf(a[i]), b[i] = a[i];
  sort(a, a + n);
  for (int i = 0; i < (n); i++) {
    ins(a[i]);
  }
  dfs();
  puts("YES");
  for (int i = 0; i < (n); i++) {
    cout << ans[b[i]].back() << endl;
    ans[b[i]].pop_back();
  }
  return 0;
}
