#include <bits/stdc++.h>
using namespace std;
int i, n, SIZE;
pair<int, int> a[1000];
struct node {
  int terminal;
  int c[2];
  node() {
    c[0] = c[1] = -1;
    terminal = 0;
  }
} t[100000];
vector<int> res;
vector<int> ans[1000];
int add(int v, int x) {
  if (t[v].terminal) {
    return 0;
  }
  if (x == 0) {
    t[v].terminal = 1;
    return 1;
  }
  if (t[v].c[0] == -1) t[v].c[0] = ++SIZE;
  res.push_back(0);
  if (add(t[v].c[0], x - 1)) return 1;
  res.pop_back();
  if (t[v].c[1] == -1) t[v].c[1] = ++SIZE;
  res.push_back(1);
  if (add(t[v].c[1], x - 1)) return 1;
  res.pop_back();
  return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie();
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a[i].first;
    a[i].second = i;
  }
  sort(a, a + n);
  for (i = 0; i < n; i++) {
    res.clear();
    if (!add(0, a[i].first)) {
      cout << "NO";
      return 0;
    }
    ans[a[i].second] = res;
  }
  cout << "YES" << endl;
  for (i = 0; i < n; i++) {
    for (int j = 0; j < ans[i].size(); j++) cout << ans[i][j];
    cout << endl;
  }
  return 0;
}
