#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
const int mod = 1e9 + 7;
int a[1005], vis[1005], ind[1005];
int cmp(int x, int y) { return a[x] < a[y]; }
string s[1005];
int change(int i) {
  int pos = s[i].size();
  pos--;
  while (s[i][pos] == '1') {
    s[i][pos--]--;
    if (pos < 0) return 0;
  }
  return s[i][pos] = '1', 1;
}
int solve() {
  int n;
  scanf("%d", &n);
  for (int i = (1); i < (n + 1); ++i) scanf("%d", &a[i]), vis[a[i]]++;
  if (a[1] == 2 && n > 2) return printf("NO\n");
  for (int i = (1); i < (11); ++i)
    if (vis[i] > (1 << i)) return printf("NO\n");
  for (int i = (1); i < (n + 1); ++i) ind[i] = i;
  sort(ind + 1, ind + n + 1, cmp);
  for (int i = (1); i < (a[ind[1]] + 1); ++i) s[ind[1]] += '0';
  for (int i = (2); i < (n + 1); ++i) {
    s[ind[i]] = s[ind[i - 1]];
    int ff = change(ind[i]);
    if (!ff) return printf("NO\n");
    for (int j = (0); j < (a[ind[i]] - a[ind[i - 1]]); ++j) s[ind[i]] += '0';
  }
  printf("YES\n");
  for (int i = (1); i < (n + 1); ++i) printf("%s\n", s[i].c_str());
}
int main() { solve(); }
