#include <bits/stdc++.h>
using namespace std;
int n, pos;
vector<int> cur;
vector<int> ans[1000 + 10];
pair<int, int> a[1000 + 10];
inline void dfs(int sz) {
  if (pos == n) return;
  if (sz == a[pos].first)
    ans[a[pos++].second] = cur;
  else {
    cur.push_back(0);
    dfs(sz + 1);
    cur.back() = 1;
    dfs(sz + 1);
    cur.pop_back();
  }
}
int main() {
  ios ::sync_with_stdio(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i].first;
    a[i].second = i;
  }
  sort(a, a + n);
  dfs(0);
  if (pos == n) {
    cout << "YES" << endl;
    for (int i = 0; i < n; cout << endl, i++)
      for (int j = 0; j < ans[i].size(); j++) cout << ans[i][j];
  } else
    cout << "NO" << endl;
}
