#include <bits/stdc++.h>
using namespace std;
int cnt;
int n;
int a[1005], b[1005];
string ans[1005], ans2[1005];
struct trie {
  int nxt[2];
  int num, fa;
  trie() {
    memset(nxt, 0, sizeof(nxt));
    fa = 0;
    num = 0;
  }
} x[500005];
string ins(int len) {
  int now = 0, dep = 0;
  string ha;
  while (dep < len) {
    if (x[now].nxt[0] == 0) {
      x[now].nxt[0] = ++cnt;
      ha += '0';
      x[cnt].fa = now;
      now = cnt;
      dep++;
    } else if (!x[x[now].nxt[0]].num) {
      now = x[now].nxt[0];
      ha += '0';
      dep++;
    } else if (!x[now].nxt[1]) {
      x[now].nxt[1] = ++cnt;
      ha += '1';
      x[cnt].fa = now;
      now = cnt;
      dep++;
    } else if (!x[x[now].nxt[1]].num) {
      now = x[now].nxt[1];
      ha += '1';
      dep++;
    } else
      return "";
  }
  x[now].num = 1;
  int ooo = (int)ha.size() - 1, nnow = now;
  while (ooo >= 0 && ha[ooo] == '1')
    x[x[nnow].fa].num = 1, ooo--, nnow = x[nnow].fa;
  return ha;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), b[i] = a[i];
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) {
    ans[i] = ins(a[i]);
    if (ans[i].size() == 0) {
      puts("NO");
      return 0;
    }
  }
  puts("YES");
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++)
      if (b[j] == ans[i].size() && !ans2[j].size()) {
        ans2[j] = ans[i];
        break;
      }
  for (int i = 1; i <= n; i++) puts(ans2[i].c_str());
  return 0;
}
