#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > v;
string ans[1010];
void func(int id, int N, int K) {
  int i;
  for ((i) = 0; (i) < (int)(N); (i)++) {
    if (K % 2 == 0)
      ans[id] += '0';
    else
      ans[id] += '1';
    K /= 2;
  }
  reverse(ans[id].begin(), ans[id].end());
}
int main(void) {
  int N, x, i, j;
  scanf("%d", &N);
  for ((i) = 0; (i) < (int)(N); (i)++) {
    scanf("%d", &x);
    v.push_back(make_pair(x, i));
  }
  sort(v.begin(), v.end());
  reverse(v.begin(), v.end());
  bool failed = false;
  int tmp = 0;
  for ((i) = 0; (i) < (int)(v.size()); (i)++) {
    if (i != 0)
      for ((j) = 0; (j) < (int)(v[i - 1].first - v[i].first); (j)++)
        tmp = (tmp + 1) / 2;
    int n = v[i].first;
    if (n < 30 && tmp >= (1 << n)) {
      failed = true;
      break;
    }
    func(v[i].second, n, tmp);
    tmp++;
  }
  if (failed) {
    printf("NO\n");
  } else {
    printf("YES\n");
    for ((i) = 0; (i) < (int)(N); (i)++) printf("%s\n", ans[i].c_str());
  }
  return 0;
}
