#include <bits/stdc++.h>
using namespace std;
int arr[22][22];
priority_queue<pair<int, int> > q;
void put(vector<pair<int, int> > puts) {
  pair<int, int> t = q.top();
  q.pop();
  if (t.first < puts.size()) {
    cout << "no" << endl;
    exit(0);
  }
  for (int i = 0; i < puts.size(); i++) {
    pair<int, int> w = puts[i];
    arr[w.first][w.second] = t.second;
  }
  t.first -= puts.size();
  if (t.first > 0) q.push(t);
}
int main() {
  map<int, int> freq;
  map<int, int>::iterator it;
  int n;
  cin >> n;
  for (int i = 0; i < n * n; i++) {
    int val;
    cin >> val;
    freq[val]++;
  }
  for (it = freq.begin(); it != freq.end(); it++)
    q.push({it->second, it->first});
  int k = n / 2;
  vector<pair<int, int> > vec;
  for (int i = 0; i < k; i++)
    for (int j = 0; j < k; j++) {
      vec.push_back({i, j});
      vec.push_back({i, n - j - 1});
      vec.push_back({n - i - 1, j});
      vec.push_back({n - i - 1, n - j - 1});
      put(vec);
      vec.clear();
    }
  if (n % 2 != 0) {
    for (int i = 0; i < k; i++) {
      vec.push_back({i, k});
      vec.push_back({n - i - 1, k});
      put(vec);
      vec.clear();
      vec.push_back({k, i});
      vec.push_back({k, n - i - 1});
      put(vec);
      vec.clear();
    }
    vec.push_back({k, k});
    put(vec);
  }
  cout << "yes" << endl;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cout << arr[i][j] << " ";
    }
    cout << endl;
  }
}
