#include <bits/stdc++.h>
using namespace std;
struct point {
  int a;
  string c;
  int xu;
} p[1005];
bool cmp1(point aa, point bb) { return aa.a < bb.a; }
bool cmp2(point aa, point bb) { return aa.xu < bb.xu; }
void output(int n) {
  sort(p, p + n, cmp1);
  int i, j;
  p[0].c = "0";
  for (i = 1; i < p[0].a; i++) p[0].c += "0";
  for (i = 1; i < n; i++) {
    p[i].c = p[i - 1].c;
    for (j = p[i].c.size() - 1; j >= 0; j--)
      if (p[i].c[j] == '0') {
        p[i].c[j] = '1';
        break;
      } else
        p[i].c[j] = '0';
    if (j < 0) {
      printf("NO\n");
      return;
    } else {
      for (j = p[i - 1].a; j < p[i].a; j++) p[i].c += "0";
    }
  }
  printf("YES\n");
  sort(p, p + n, cmp2);
  for (i = 0; i < n; i++) cout << p[i].c << endl;
}
int main() {
  int n, i, j;
  while (~scanf("%d", &n)) {
    for (i = 0; i < n; i++) {
      scanf("%d", &p[i].a);
      p[i].xu = i;
    }
    output(n);
  }
}
