#include <bits/stdc++.h>
using namespace std;
int n, now, flag;
struct Str {
  int x, y;
  string str;
} p[1005];
bool cmp1(Str a, Str b) { return a.x < b.x; }
bool cmp2(Str a, Str b) { return a.y < b.y; }
void dfs(int x, string s) {
  if (x == p[now].x) {
    p[now++].str = s;
    if (now == n) flag = 1;
    return;
  }
  dfs(x + 1, s + '0');
  if (now == n) return;
  dfs(x + 1, s + '1');
  if (now == n) return;
}
int main() {
  int i;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &p[i].x);
    p[i].y = i;
    p[i].str = "";
  }
  sort(p, p + n, cmp1);
  dfs(0, "");
  if (!flag)
    printf("NO\n");
  else {
    printf("YES\n");
    sort(p, p + n, cmp2);
    for (i = 0; i < n; i++) cout << p[i].str << endl;
  }
}
