#include <bits/stdc++.h>
using namespace std;
class Node {
 public:
  char bit;
  string bits;
  Node* left;
  Node* right;
  bool prefix;
  Node(char bit, string bits) {
    this->bit = bit;
    this->bits = bits;
    this->bits.push_back(bit);
    this->prefix = false;
    this->left = NULL;
    this->right = NULL;
  }
  Node() {
    this->left = NULL;
    this->right = NULL;
    this->prefix = false;
  }
};
class Rsolve {
 public:
  Node* head;
  vector<pair<string, int>> Nodes;
  Rsolve() { head = new Node; }
  int Add(int num, int index) {
    int cont = 0;
    Node* tmp = head;
    if (tmp->left != NULL && tmp->right != NULL) {
      if (tmp->left->prefix == true && tmp->right->prefix == true) {
        return 0;
      }
    }
    while (cont < num) {
      if (tmp->left == NULL) {
        tmp->left = new Node('0', tmp->bits);
        tmp = tmp->left;
      } else if (tmp->left != NULL) {
        if (tmp->left->prefix == true) {
          if (tmp->right == NULL) {
            tmp->right = new Node('1', tmp->bits);
            tmp = tmp->right;
          } else if (tmp->right != NULL) {
            if (tmp->right->prefix != true) {
              tmp = tmp->right;
            } else {
              tmp->prefix = true;
              return 2;
            }
          }
        } else {
          tmp = tmp->left;
        }
      }
      cont++;
    }
    tmp->prefix = true;
    Nodes.push_back(make_pair(tmp->bits, index));
    return 1;
  }
};
bool PairCompare(pair<int, int> a, pair<int, int> b) {
  return a.second < b.second;
}
bool PairCompare2(pair<string, int> a, pair<string, int> b) {
  return a.second < b.second;
}
int main() {
  Rsolve r;
  int n, m, test;
  vector<pair<int, int>> ms;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> m;
    ms.push_back(make_pair(i, m));
  }
  sort(ms.begin(), ms.end(), PairCompare);
  for (int i = 0; i < n; i++) {
    test = r.Add(ms[i].second, ms[i].first);
    while (test != 1) {
      if (test == 0) {
        cout << "NO" << endl;
        return 0;
      }
      test = r.Add(ms[i].second, ms[i].first);
    }
  }
  cout << "YES" << endl;
  sort(r.Nodes.begin(), r.Nodes.end(), PairCompare2);
  for (int i = 0; i < n; i++) {
    cout << r.Nodes[i].first << endl;
  }
  return 0;
}
