#include <bits/stdc++.h>
using namespace std;
int n;
int c;
vector<pair<int, int> > v(1001);
string ans[10001];
void dfs(int x, string s) {
  if (c == n) return;
  if (x == v[c].first) {
    ans[v[c++].second] = s;
    return;
  }
  dfs(x + 1, s + '0');
  dfs(x + 1, s + '1');
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    int y;
    cin >> y;
    v[i].first = y;
    v[i].second = i;
  }
  sort(v.begin(), v.begin() + n);
  dfs(0, "");
  if (c < n)
    cout << "NO";
  else {
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) cout << ans[i] << endl;
  }
}
