#include <bits/stdc++.h>
using namespace std;
struct number {
  int num;
  int ind;
};
int N;
number num[1005];
int ans[1005][1005];
bool ok = true;
bool my_cmp(const number& L, const number& R) { return L.num < R.num; }
int main() {
  scanf("%d", &N);
  for (int i = 0; i < N; i++) {
    scanf("%d", &num[i].num);
    num[i].ind = i;
  }
  sort(num, num + N, my_cmp);
  ans[num[0].ind][0] = num[0].num;
  for (int i = 1; i < N; i++) {
    for (int j = 0; j <= ans[num[i - 1].ind][0]; j++)
      ans[num[i].ind][j] = ans[num[i - 1].ind][j];
    int id = ans[num[i].ind][0];
    ans[num[i].ind][id]++;
    while (ans[num[i].ind][id] > 1 && id) {
      ans[num[i].ind][id] = 0;
      ans[num[i].ind][id - 1]++;
      id--;
    }
    if (id < 1) ok = false;
    ans[num[i].ind][id] = 1;
    ans[num[i].ind][0] = num[i].num;
  }
  if (!ok) {
    printf("NO");
    return 0;
  }
  printf("YES\n");
  for (int i = 0; i < N; i++) {
    for (int j = 1; j <= ans[i][0]; j++) printf("%d", ans[i][j]);
    printf("\n");
  }
  return 0;
}
