#include <bits/stdc++.h>
using namespace std;
int a[1000 + 10];
int ret[21][21];
int pool[410], two[100];
int main() {
  ios::sync_with_stdio(false);
  memset(a, 0, sizeof(a));
  memset(ret, 0, sizeof(ret));
  memset(pool, 0, sizeof(pool));
  memset(two, 0, sizeof(two));
  int n;
  cin >> n;
  int t, tag = 0, tt = 0;
  for (int i = 0; i < n * n; i++) {
    cin >> t;
    a[t]++;
  }
  if (n == 1) {
    cout << "yes"
         << "\n";
    cout << t << "\n";
    return 0;
  }
  if (n % 2) {
    int cnt = 0;
    for (int i = 1; i <= 1000; i++) {
      if (a[i] % 4) {
        if (a[i] % 2) {
          if (cnt == 0) {
            ret[n / 2][n / 2] = i;
            a[i]--;
            cnt = 1;
          } else {
            cout << "no"
                 << "\n";
            return 0;
          }
        }
        if (a[i] % 4) {
          two[tt++] = i;
          a[i] -= 2;
          if (tt > (n - 1)) {
            cout << "no"
                 << "\n";
            return 0;
          }
        }
      }
      while (a[i] > 0) {
        pool[tag++] = i;
        a[i] -= 4;
      }
    }
    while (tt < (n - 1)) {
      two[tt++] = pool[--tag];
      two[tt++] = pool[tag];
    }
    int cnt2 = 0, cnt4 = 0;
    for (int i = 0; i * 2 < n; i++) {
      for (int j = 0; j * 2 < n; j++) {
        if (i == n / 2 && j == n / 2) continue;
        if (i == n / 2) {
          ret[i][j] = two[cnt2++];
          ret[i][n - j - 1] = ret[i][j];
        } else if (j == n / 2) {
          ret[i][j] = two[cnt2++];
          ret[n - i - 1][j] = ret[i][j];
        } else {
          ret[i][j] = pool[cnt4++];
          ret[n - i - 1][n - j - 1] = ret[i][j];
          ret[i][n - j - 1] = ret[i][j];
          ret[n - i - 1][j] = ret[i][j];
        }
      }
    }
  } else {
    bool can = true;
    for (int i = 1; i <= 1000; i++) {
      if (a[i] % 4) {
        cout << "no"
             << "\n";
        return 0;
      }
      while (a[i] > 0) {
        pool[tag++] = i;
        a[i] -= 4;
      }
    }
    for (int i = 0; i * 2 < n; i++) {
      for (int j = 0; j * 2 < n; j++) {
        ret[i][j] = pool[i * n / 2 + j];
        ret[n - i - 1][n - j - 1] = ret[i][j];
        ret[i][n - j - 1] = ret[i][j];
        ret[n - i - 1][j] = ret[i][j];
      }
    }
  }
  cout << "yes"
       << "\n";
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cout << ret[i][j];
      if (j == n - 1)
        cout << "\n";
      else
        cout << " ";
    }
  }
}
