#include <bits/stdc++.h>
using namespace std;
string add(string res) {
  int i = res.size() - 1;
  while (i >= 0 && res[i] == '1') res[i--] = '0';
  if (i == -1) return "-1";
  res[i] = '1';
  return res;
}
int main() {
  int n, i;
  pair<int, int> arr[1001];
  string res[1001];
  scanf("%d", &n);
  for (int j = 0; j < n; ++j) scanf("%d", &arr[j].first), arr[j].second = j;
  sort(arr, arr + n), res[arr[0].second] = string(arr[0].first, '0');
  for (i = 1; i < n; ++i) {
    int ind = arr[i].second, prev = arr[i - 1].second;
    res[ind] = add(res[prev]);
    if (res[ind] == "-1") break;
    res[ind] += string((arr[i].first - arr[i - 1].first), '0');
  }
  if (i != n)
    printf("NO\n");
  else {
    printf("YES\n");
    for (int i = 0; i < n; ++i) cout << res[i] << endl;
  }
  return 0;
}
