#include <bits/stdc++.h>
using namespace std;
int n;
pair<int, int> arr[2000];
vector<string> start;
string res = "-1";
void fun(int x, string cur) {
  if (cur.size() == x) {
    res = cur;
    return;
  }
  fun(x, cur + "0");
  start.push_back(cur + "1");
}
bool comp(string a, string b) { return a.size() > b.size(); }
int main() {
  cin >> n;
  vector<string> v(n);
  for (int i = 0; i < n; i++) cin >> arr[i].first, arr[i].second = i;
  sort(arr, arr + n);
  start.push_back("");
  for (int i = 0; i < n; i++) {
    res = "-1";
    sort((start).begin(), (start).end(), comp);
    int SZ = start.size();
    for (int j = 0; j < SZ; j++)
      if (start[j].size() <= arr[i].first) {
        fun(arr[i].first, start[j]);
        start.erase(start.begin() + j);
        break;
      }
    if (res == "-1") {
      cout << "NO" << endl;
      return 0;
    }
    v[arr[i].second] = res;
  }
  cout << "YES" << endl;
  for (int i = 0; i < v.size(); i++) cout << v[i] << endl;
  return 0;
}
