#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
int n, idx;
pair<int, int> v[1001];
string res[1001];
string cur;
void dfs(int x) {
  if (idx == n) return;
  if (v[idx].first == x) {
    res[v[idx].second] = cur;
    idx++;
  } else {
    cur += '0';
    dfs(x + 1);
    cur[(int)cur.size() - 1] = '1';
    dfs(x + 1);
    cur.erase(cur.size() - 1, 1);
  }
}
int main() {
  cin >> n;
  for (int i = (0); i < (n); i++) {
    cin >> v[i].first;
    v[i].second = i;
  }
  sort(v, v + n);
  idx = 0;
  dfs(0);
  int cnt = 0;
  for (int i = (0); i < (n); i++) cnt += (res[i] != "");
  if (cnt == n) {
    cout << "YES" << endl;
    for (int i = (0); i < (n); i++) cout << res[i] << endl;
  } else
    cout << "NO" << endl;
  return 0;
}
