#include <iostream>
#include <cmath>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
using ll = long long;

int in(){///値を丸める
  double x;
  cin >> x;
  x *= 10000;
  return round(x);
}

bool ok(ll dx,ll dy,ll z){//円のうちなら1
  return dx*dx + dy*dy <= z*z;
}

ll f(ll x,ll y,ll z,ll lim){
  int l=0,r=1;
  ll res = 0;
  for(int i=int(1000000000);i>=lim;i-=10000){
    while(ok(l*10000+x,i-y,z))++l;
    while(ok(r*10000-x,i-y,z))++r;
    res += r+l-1;
  }
  return res;
}

int main(){
  ll x=in();
  ll y=in();
  ll z=in();
  x%=10000;
  y%=10000;
  ll ans =f(x,y,z,10000);
  ans += f(x,-y,z,0);
  cout << ans << endl;
  return 0;
}
#include <bits/stdc++.h>
#define rep(i, begin, end) for (i=begin;i<end;i++)
#define printint(i0, i1) printf("%d %d\n", i0, i1)
#define MAX_N 1000

using namespace std;
typedef long long int ll;
const int inf = 1000000000;
const int mod = 1000000007;
const int nil = -1;
ll i, j, n, m, k, ans;
ll c[500][500];
ll a[500], b[500];

int main() {
    scanf(" %lld", &n);
    rep(i,0,n) rep(j,0,n) {
        scanf(" %lld", &c[i][j]);
    }
    bool exists = true;
    ll mincol = 0;
    rep(i,0,n) if (c[i][0] < c[mincol][0]) mincol = i;
    rep(i,0,n-1) {
        ll law = c[i+1][0] - c[i][0];
        rep(j,1,n) {
            if (c[i+1][j] - c[i][j] != law) {
                exists = false;
            }
        }
    }
    rep(j,0,n-1) {
        ll law = c[0][j+1] - c[0][j];
        rep(i,1,n) {
            if (c[i][j+1] - c[i][j] != law) {
                exists = false;
            }
        }
    }
    rep(j,0,n) b[j] = c[mincol][j];
    rep(i,0,n) a[i] = c[i][0] - c[mincol][0];

    if (exists) {
        printf("Yes\n");
        rep(i,0,n) printf("%lld ", a[i]);
        printf("\n");
        rep(i,0,n) printf("%lld ", b[i]);
        printf("\n");
    } else {
        printf("No\n");
    }
}