#include <bits/stdc++.h>
using namespace std;
struct trie {
  trie *p[2];
  bool us;
  trie() {
    p[0] = p[1] = 0;
    us = 0;
  }
};
struct data {
  int in, l, si;
};
trie h;
int l[1005], nowi, ans;
char str[1005];
data arr[1005];
string arrs[1005];
bool cmp(data a, data b) { return a.l < b.l; }
bool cmp2(data a, data b) { return a.in < b.in; }
bool dfs(trie *now, int dep, int en) {
  bool t;
  if (now->us) return 0;
  if (dep == en) {
    str[dep] = 0;
    arrs[ans] = str;
    arr[nowi].si = ans;
    ans++;
    now->us = 1;
    return 1;
  }
  if (!now->p[0]) now->p[0] = new trie;
  str[dep] = '0';
  t = dfs(now->p[0], dep + 1, en);
  if (t) return 1;
  if (!now->p[1]) now->p[1] = new trie;
  str[dep] = '1';
  t = dfs(now->p[1], dep + 1, en);
  if (t) return 1;
  return 0;
}
int main() {
  int n, t, i;
  bool su;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &t);
    arr[i].in = i;
    arr[i].l = t;
  }
  sort(arr, arr + n, cmp);
  su = 1;
  for (i = 0; i < n; i++) {
    nowi = i;
    su = dfs(&h, 0, arr[i].l);
    if (!su) break;
  }
  if (!su)
    printf("NO\n");
  else {
    printf("YES\n");
    sort(arr, arr + n, cmp2);
    for (i = 0; i < n; i++) printf("%s\n", arrs[arr[i].si].c_str());
  }
}
