#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define rep(i,a,n) for(int i=a;i<n;i++)
#define per(i,a,n) for(int i=a;i>=n;i--)
#define pb push_back
#define mp make_pair
#define mem(a,b) memset(a,b,sizeof(a))
ll gcd(ll a,ll b){if(b==0)return a;else return gcd(b,a%b);}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}
const int maxn=500;
ll a[maxn+5][maxn+5];
int main()
{

    int n;
    cin>>n;
    rep(i,0,n)
    {
        rep(j,0,n)
        cin>>a[i][j];
    }
    bool flag=1;
    ll dif[n];
    rep(i,0,n)
    {
        dif[i]=a[i][0]-a[(i+1)%n][0];
    }
    rep(i,0,n)
    {
        rep(j,0,n)
        {
            ll tmp=a[i][j]-a[(i+1)%n][j];
            if(tmp!=dif[i])
            {
                cout<<"No"<<endl;
                return 0;
            }
        }
    }
    rep(i,0,n)
    {
        dif[i]=a[0][i]-a[0][(i+1)%n];
    }
    rep(i,0,n)
    {
        rep(j,0,n)
        {
            ll tmp=a[j][i]-a[j][(i+1)%n];
            if(tmp!=dif[i])
            {
                cout<<"No"<<endl;
                return 0;
            }
        }
    }
    cout<<"Yes"<<endl;
    ll min=0x3f3f3f3f3f3f3f3f;
    int minum=0;
    ll ans1[maxn+5];
    ll ans2[maxn+5];
    rep(i,0,n)
    {
        if(a[i][0]<min)
        {
            minum=i;
            min=a[i][0];
        }
    }
    rep(i,0,n)
    {
        ans2[i]=a[minum][i];
    }
    rep(i,0,n)
    {
        ans1[i]=a[i][0]-ans2[0];
    }
    rep(i,0,n)
    {
        cout<<ans1[i]<<" ";

    }
    cout<<endl;
    rep(i,0,n)
    {
        cout<<ans2[i]<<" ";
    }
    cout<<endl;
    return 0;
}
#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<ll, int> pli;
typedef pair<int, ll> pil;
typedef vector<pii> vii;
typedef vector<pil> vil;
typedef vector<pli> vli;
typedef vector<pll> vll;

#define FIO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define sz size()
#define all(a)  a.begin(), a.end()
#define mem(a, b)     memset(a, b, sizeof(a))
#define f0(i,n) for(int i=0;i<(n);i++)
#define f1(i,n) for(int i=1;i<=(n);i++)
#define f2(i,a,n) for(int i=(a);i<=(n);i++)
#define fr(i,n,a) for(int i=(n);i>=(a);i--)
#define rep(i,a,b,c) for(int i=(a);i!=(b);i+=(c))
#define nl "\n"


const int INF = 1e9 + 5;
const int MXN = 2e5 + 5;
const ll LMXN = 1e14;
const int MOD = 1e9 + 7;
ll cs = 0;


void solve(){
    int v, t, s, d; cin >> v >> t >> s >> d;
    if(d >= v*t && d <= v*s) cout << "No" << nl;
    else cout << "Yes" << nl;
}

int main(){
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    FIO;
    ll t = 1;
    //cin >> t;
    while(t--){
        solve();
    }
    return 0;
}
