#include <bits/stdc++.h>
using namespace std;
inline void add(string &s) {
  if (s == "") {
    s = "0";
    return;
  }
  if (s.find('0') == string::npos) {
    cout << "NO" << endl;
    exit(0);
  }
  for (int i = s.size() - 1; i >= 0; i--) {
    if (s[i] == '1')
      s[i] = '0';
    else {
      s[i] = '1';
      return;
    }
  }
}
struct ppp {
  int val;
  int pos;
  bool operator<(const ppp &ot) const { return val < ot.val; }
};
bool cmp(const ppp &a, const ppp &b) { return a.pos < b.pos; }
int main() {
  int n;
  cin >> n;
  ppp s[1111];
  for (int i = 0; i < n; i++) {
    cin >> s[i].val;
    s[i].pos = i;
  }
  sort(s, s + n);
  vector<string> v;
  set<string> u;
  string cur;
  for (int i = 0; i < n; i++) {
    cur = "";
    for (; cur.size() < s[i].val;) {
      while (u.find(cur) != u.end()) {
        add(cur);
      }
      cur += "0";
    }
    while (u.find(cur) != u.end()) {
      add(cur);
    }
    v.push_back(cur);
    u.insert(cur);
  }
  cout << "YES" << endl;
  sort(s, s + n, cmp);
  for (int i = 0; i < n; i++) {
    for (int u = 0; u < v.size(); u++) {
      if (v[u].length() == s[i].val) {
        cout << v[u] << endl;
        v.erase(v.begin() + u);
        break;
      }
    }
  }
  return 0;
}
