#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000;
int n;
int num[MAXN + 10], nm[MAXN + 10];
vector<string> res[MAXN + 10];
bool goConstruct(int dep, string cur) {
  if (dep == n) {
    return true;
  }
  if (dep == 0) {
    for (int i = 0; i < num[0]; i++) cur += '0';
    res[num[0]].push_back(cur);
    return goConstruct(dep + 1, cur);
  } else {
    if (count(cur.begin(), cur.end(), '1') == cur.size()) return false;
    int siz = cur.size() - 1;
    while (cur[siz] != '0') {
      cur[siz] = '0';
      siz--;
    }
    cur[siz] = '1';
    if (num[dep - 1] == num[dep]) {
      res[num[dep]].push_back(cur);
      return goConstruct(dep + 1, cur);
    } else {
      for (int i = 0; i < num[dep] - num[dep - 1]; i++) cur += '0';
      res[num[dep]].push_back(cur);
      return goConstruct(dep + 1, cur);
    }
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &num[i]);
    nm[i] = num[i];
  }
  sort(num, num + n);
  bool f = goConstruct(0, "");
  if (!f) {
    printf("NO\n");
  } else {
    printf("YES\n");
    for (int i = 0; i < n; i++) {
      printf("%s\n", res[nm[i]][res[nm[i]].size() - 1].c_str());
      res[nm[i]].pop_back();
    }
  }
  return 0;
}
