#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long ull;

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll myRand(ll B) {
	return (ull)rng() % B;
}

int main(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	int n; cin >> n;
	vector<vector<int>> c(n,vector<int>(n));
	ll sum=0;
	for(int i=0;i<n;i++){
		for(int j=0;j<n;j++){
			cin >> c[i][j];
			sum+=(ll)c[i][j];
		}
	}
	if(sum%n!=0){
		printf("No\n");
		return 0;
	}
	sum/=n;
	vector<int> a(n,2e9),b(n,2e9);
	for(int i=0;i<n;i++){
		for(int j=0;j<n;j++){
			a[i]=min(a[i],c[i][j]);
			b[j]=min(b[j],c[i][j]);
		}
	}
	for(int i=0;i<n;i++){
		for(int j=0;j<n;j++){
			if(a[i]+b[j]<c[i][j]){
				printf("No\n");
				return 0;
			}
		}
	}
	for(int i=0;i<n;i++){
		ll psum=0;
		for(int j=0;j<n;j++){
			psum+=(ll)c[j][(i+j)%n];
		}
		if(psum!=sum){
			printf("No\n");
			return 0;
		}
	}
	int mi=1e9;
	int k=0;
	for(int i=0;i<n;i++){
		for(int j=0;j<n;j++){
			if(mi>c[i][j]){
				mi=c[i][j];
				k=j;
			}
		}
	}
	b[k]=0;
	for(int i=0;i<n;i++){
		a[i]=c[i][k];
	}
	for(int j=0;j<n;j++){
		b[j]=c[0][j]-a[0];
	}
	cout << "Yes" << endl;
	for(int i=0;i<n;i++){
		cout << a[i] << " ";
	}
	cout << endl;
	for(int i=0;i<n;i++){
		cout << b[i] << " ";
	}
	cout << endl;
}
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T> using vec = vector<T>;
template <class T> using vvec = vector<vec<T>>;
template<class T> bool chmin(T& a,T b){if(a>b) {a = b; return true;} return false;}
template<class T> bool chmax(T& a,T b){if(a<b) {a = b; return true;} return false;}
#define all(x) (x).begin(),(x).end()
#define debug(x)  cerr << #x << " = " << (x) << endl;

class UnionFind{
private:
    vec<int> p,s;
    int cnt;
public:
    UnionFind(){}
    UnionFind(int N):cnt(N),s(N,1),p(N){
        iota(p.begin(),p.end(),0);
    }
    int find(int x){
        if(p[x]==x) return x;
        else return p[x] = find(p[x]);
    }
    void unite(int x,int y){
        x = find(x); y = find(y);
        if(x==y) return;
        if(s[x]>s[y]) swap(x,y);
        p[x] = y;
        s[y] += s[x];
        cnt--;
    }
    bool is_same_set(int x,int y) {return find(x)==find(y);}
    int size(int x) {return s[find(x)];}
    int compnents_number(){return cnt;}
};

struct edge{
    int s,t,val;
    bool operator<(const edge& e)const{
        return val<e.val;
    }
};

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int N;
    cin >> N;
    vec<int> X(N+2),Y(N+2);
    for(int i=1;i<=N;i++) cin >> X[i] >> Y[i];
    vec<edge> E;
    for(int i=1;i<=N;i++){
        int d = 100-Y[i];
        E.push_back({0,i,d*d});
    }
    for(int i=1;i<=N;i++){
        int d = 100+Y[i];
        E.push_back({N+1,i,d*d});
    }
    for(int i=1;i<N;i++) for(int j=i+1;j<=N;j++){
        int dx = X[j]-X[i],dy = Y[j]-Y[i];
        E.push_back({i,j,dx*dx+dy*dy});
    }
    double ans = 0;
    sort(all(E));
    UnionFind uf(N+2);
    for(auto& x:E){
        ans = sqrt(x.val)/2;
        uf.unite(x.s,x.t);
        if(uf.is_same_set(0,N+1)) break;
    }
    cout << fixed << setprecision(10) << ans << "\n";
}