#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
long long INF = 1e18;
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  long long n;
  cin >> n;
  vector<vector<long long> > ans(n, vector<long long>(n, -1));
  map<long long, long long> freq;
  for (long long i = 0; i < n * n; i++) {
    long long x;
    cin >> x;
    freq[x]++;
  }
  set<pair<long long, long long> > s;
  for (auto it : freq) s.insert(make_pair(it.second, it.first));
  bool isok = true;
  for (long long i = 0; i < n / 2 && isok; i++) {
    for (long long j = 0; j < n / 2 && isok; j++) {
      long long num = (*s.rbegin()).second;
      long long fr = (*s.rbegin()).first;
      s.erase(make_pair(fr, num));
      if (fr < 4) {
        isok = false;
        break;
      }
      ans[i][j] = num;
      ans[n - i - 1][j] = num;
      ans[i][n - j - 1] = num;
      ans[n - i - 1][n - j - 1] = num;
      fr -= 4;
      if (fr > 0) s.insert(make_pair(fr, num));
    }
  }
  if (!isok) {
    cout << "No" << '\n';
    return 0;
  }
  if (n % 2 == 1) {
    for (long long j = 0; j < n / 2 && isok; j++) {
      long long num = (*s.rbegin()).second;
      long long fr = (*s.rbegin()).first;
      s.erase(make_pair(fr, num));
      if (fr < 2) {
        isok = false;
        break;
      }
      ans[n / 2][j] = num;
      ans[n / 2][n - j - 1] = num;
      fr -= 2;
      if (fr > 0) s.insert(make_pair(fr, num));
    }
    for (long long i = 0; i < n / 2 && isok; i++) {
      long long num = (*s.rbegin()).second;
      long long fr = (*s.rbegin()).first;
      s.erase(make_pair(fr, num));
      if (fr < 2) {
        isok = false;
        break;
      }
      ans[i][n / 2] = num;
      ans[n - i - 1][n / 2] = num;
      fr -= 2;
      if (fr > 0) s.insert(make_pair(fr, num));
    }
    long long num = (*s.rbegin()).second;
    long long fr = (*s.rbegin()).first;
    s.erase(make_pair(fr, num));
    if (fr < 1)
      isok = false;
    else
      ans[n / 2][n / 2] = num;
  }
  if (!isok) {
    cout << "No" << '\n';
    return 0;
  }
  cout << "Yes" << '\n';
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < n; j++) cout << ans[i][j] << ' ';
    cout << '\n';
  }
  return 0;
}
