#include <bits/stdc++.h>
using namespace std;
vector<int> vec[1010];
int ans[1010][1010];
int tmp[1010], flag[1010];
int order[1010];
int n, cnt;
void dfs(int now) {
  if (cnt == n) return;
  if (flag[now] > 0) {
    cnt++;
    for (int i = 1; i <= now; i++) {
      ans[cnt][i] = tmp[i];
    }
    vec[now].push_back(cnt);
    flag[now]--;
    return;
  }
  tmp[now + 1] = 0;
  dfs(now + 1);
  tmp[now + 1] = 1;
  dfs(now + 1);
}
int main() {
  scanf("%d", &n);
  cnt = 0;
  memset(flag, 0, sizeof(flag));
  for (int i = 1; i <= n; i++) {
    int key;
    scanf("%d", &key);
    order[i] = key;
    flag[key]++;
  }
  dfs(0);
  if (cnt < n)
    printf("NO\n");
  else {
    printf("YES\n");
    for (int i = 1; i <= n; i++) {
      int v = vec[order[i]][0];
      vector<int>::iterator it = vec[order[i]].begin();
      vec[order[i]].erase(it);
      for (int j = 1; j <= order[i]; j++) printf("%d", ans[v][j]);
      printf("\n");
    }
  }
  return 0;
}
