#include <bits/stdc++.h>
using namespace std;
template <class T1, class T2>
inline void remax(T1 &A, T2 B) {
  if (A < B) A = B;
}
template <class T1, class T2>
inline void remin(T1 &A, T2 B) {
  if (A > B) A = B;
}
long long Gcd(long long a, long long b) {
  if (!a || !b) return a + b;
  while (a %= b ^= a ^= b ^= a)
    ;
  return b;
}
long long Power(long long base, unsigned long long power) {
  long long ret = 1;
  while (power) {
    if (power & 1) ret *= base;
    power >>= 1;
    base *= base;
  }
  return ret;
}
long long PowerMod(long long base, unsigned long long power, long long mod) {
  if (!power) return 1 % mod;
  if (power & 1) return (base * PowerMod(base, power - 1, mod)) % mod;
  return PowerMod((base * base) % mod, power >> 1, mod);
}
stack<char> st;
struct node {
 private:
  node *left;
  node *right;
  bool leaf;

 public:
  node() {
    left = right = 0;
    leaf = false;
  }
  ~node() {
    if (left) delete left;
    if (right) delete right;
  }
  bool insert(int sz) {
    if (leaf) return false;
    if (!sz) {
      leaf = true;
      return true;
    }
    if (!left) left = new node();
    if (left->insert(sz - 1)) {
      st.emplace('0');
      return true;
    }
    if (!right) right = new node();
    if (right->insert(sz - 1)) {
      st.emplace('1');
      return true;
    }
    return false;
  }
};
char ans[1000][1001];
inline void run() {
  pair<int, int> arr[1000];
  node trie;
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", &arr[i].first), arr[i].second = i;
  sort(arr, arr + n);
  while (!st.empty()) st.pop();
  memset(ans, 0, sizeof ans);
  for (int i = 0; i < n; ++i) {
    if (!trie.insert(arr[i].first)) return (void)puts("NO");
    for (int j = 0; j < arr[i].first; ++j) {
      ans[arr[i].second][j] = st.top();
      st.pop();
    }
  }
  puts("YES");
  for (int i = 0; i < n; ++i) printf("%s\n", ans[i]);
}
int main() {
  run();
  return 0;
}
