#include <bits/stdc++.h>
using namespace std;
vector<string> ans, res;
int main() {
  int n;
  cin >> n;
  vector<pair<int, int> > arr(n);
  for (int i = 0; i < n; i++) {
    cin >> arr[i].first;
    arr[i].second = i;
  }
  sort(arr.begin(), arr.end());
  string now = "";
  for (int i = 0; i < arr[0].first; i++) now += "0";
  ans.push_back(now);
  for (int i = 1; i < n; i++) {
    bool ok = false;
    for (int j = now.length() - 1; j >= 0; j--)
      if (now[j] == '0') {
        now[j] = '1';
        for (int k = j + 1; k < now.length(); k++) now[k] = '0';
        ok = true;
        break;
      }
    if (!ok) {
      cout << "NO" << endl;
      return 0;
    }
    while (now.length() < arr[i].first) now += "0";
    ans.push_back(now);
  }
  res.resize(n);
  for (int i = 0; i < n; i++) res[arr[i].second] = ans[i];
  cout << "YES" << endl;
  for (int i = 0; i < n; i++) cout << res[i] << endl;
  return 0;
}
