Problem: You are storing an integer array of length m in a database. To maintain internal integrity and protect data, the database stores n copies of this array.

Unfortunately, the recent incident may have altered the stored information in every copy in the database.

It's believed, that the incident altered at most two elements in every copy. You need to recover the original array based on the current state of the database.

In case there are multiple ways to restore the array, report any. If there is no array that differs from every copy in no more than two positions, report that as well.

Input

The first line contains integers n and m (2 ≤ n; 1 ≤ m; n ⋅ m ≤ 250 000) — the number of copies and the size of the array.

Each of the following n lines describes one of the currently stored copies in the database, it consists of m integers s_{i, 1}, s_{i, 2}, ..., s_{i, m} (1 ≤ s_{i, j} ≤ 10^9).

Output

If there is an array consistent with all given copies, print "Yes" and then the array itself. The array must have length m and contain integers between 1 and 10^9 only.

Otherwise, print "No".

If there are multiple possible arrays, print any of them.

Examples

Input


3 4
1 10 10 100
1 1 1 100
10 100 1 100


Output


Yes
1 10 1 100


Input


10 7
1 1 1 1 1 1 1
1 1 1 1 1 1 2
1 1 1 1 1 2 2
1 1 1 1 2 2 1
1 1 1 2 2 1 1
1 1 2 2 1 1 1
1 2 2 1 1 1 1
2 2 1 1 1 1 1
2 1 1 1 1 1 1
1 1 1 1 1 1 1


Output


Yes
1 1 1 1 1 1 1


Input


2 5
2 2 1 1 1
1 1 2 2 2


Output


No

Note

In the first example, the array [1, 10, 1, 100] differs from first and second copies in just one position, and from the third copy in two positions.

In the second example, array [1, 1, 1, 1, 1, 1, 1] is the same as the first copy and differs from all other copies in at most two positions.

In the third example, there is no array differing in at most two positions from every database's copy.

Solution (in CPP):

Solution:
#include<bits/stdc++.h>
/*---------------------Define--------------------*/
#define int long long
#define next nextt
#define pii pair<int,int>
#define fi first
#define se second
#define rd random
#define ll long long
#define taskname ""
#define pb push_back
#define mp make_pair
#define pb push_back
#define popb pop_back
#define popf pop_front
#define pf push_front
#define res(a,z,n) for(int i = 1 ; i<=n ; i ++) a[i] = z;
/*-------------------necesary---------------------*/
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
/*------------------constrain-------------------------*/
const int base  = 998244353 ;
const int oo = 1e6 + 10;
const int gh = 1e3 + 3 ;
const int inf = 1e15 + 5 ;
double pi=2*asin(1);
/*-----------------globalvari-----------------------*/
int n,m,k;
vector<int> a[oo] ;
int a1[oo] , a2[oo];
int sum[oo];
string s;
char c[oo];
/*-----------------code-----------------------*/
int X[5];
vector<int> M;
vector<int> b;
int fl = 0, tfl = 0;
vector<vector<int>> V;

void Alo(vector<int> &b)
{
    for(int i = 1 ; i <= n ; i ++)
    {
        int  mis = 0;
        for(int j = 1 ; j <= m ; j ++)
            {
                if(a[i][j]!=b[j])
                    mis++;
            }
        if(mis >= 3) return ;
    }
    cout<<"Yes\n";
    for(int i = 1 ; i <= m ; i ++)
        {
            cout<<b[i]<<" ";
        }
    exit(0);
}

void ck(vector<int> b)
{
    int t = 0;
    for(int i = 0 ; i < M.size() ; i ++)
    {
    //    cerr<<X[i]<<" ";
        t+=X[i];
    }
    //cerr<<"\n";
    if(M.size() == 4)
    {
        if(t!=2) return ;
    }
    if(M.size() == 3)
    {
        if(t%3 == 0) return ;
    }
    for(int i = 0 ; i < M.size() ; i ++)
    {
        if(X[i] == 1)
                b[M[i]] = a[fl][M[i]];
    }
    //cerr<<b.size()<<endl;
    if(tfl == 0)
        V.pb(b);
    Alo(b);

}

void snp(int d,vector<int> &b)
{

    if(d == M.size() ) {ck(b);return ;}
    for(int i = 0 ; i <= 1 ; i ++)
    {
        X[d] = i;
        snp(d+1,b);
    }
}

vector<int> T;

void Xuli(vector<int> &b)
{
    for(int i = 2 ; i <= n ; i ++)
    {
        int  mis = 0;
        for(int j = 1 ; j <= m ; j ++)
            {
                if(a[i][j]!=b[j])
                    mis++;
            }
        if(mis >= 3) fl = i;
        if(mis == 4) {fl = i;break;}
        if(mis >=5 ) {cout<<"No";return ;}
    }
    if(fl == 0)
    {
        cout<<"Yes\n";
        for(int i = 1 ; i <= m ; i ++)
            cout<<b[i]<<" ";
        return ;
    }
    M.clear();
    for(int j = 1 ; j <= m ; j ++)
    {

        //cerr<<b[j]<<" ";
        if(b[j] != a[fl][j]) M.pb(j);
    }
//cerr<<fl<<endl;
    snp(0,b);
    //cerr<<1<<endl;
    //cout<<"No";
}

void Main()
{
    cin>>n>>m;
    for(int i = 1 ; i <= n ; i ++)
    {
        a[i].resize(m + 1);
    }
    b.resize(m+1);
    for(int i = 1 ; i <= n ; i ++)
        for(int j = 1 ; j <= m ; j ++)
            cin>>a[i][j];
    for(int i = 1 ; i <= m ; i ++)
        b[i] = a[1][i];
    for(int i = 2 ; i <= n ; i ++)
    {
        int  mis = 0;
        for(int j = 1 ; j <= m ; j ++)
            {
                if(a[i][j]!=a[1][j])
                    mis++;
            }
        if(mis >= 3) fl = i;
        if(mis == 4) {fl = i;break;}
        if(mis >=5 ) {cout<<"No";return ;}
    }
    if(fl == 0)
    {
        cout<<"Yes\n";
        for(int i = 1 ; i <= m ; i ++)
            cout<<b[i]<<" ";
        return ;
    }

    for(int j = 1 ; j <= m ; j ++)
    {
        if(b[j] != a[fl][j]) M.pb(j);
    }
    snp(0,a[1]);
    if(M.size() == 4)
    cout<<"No";
    else
    {
        tfl = 1;
        for(auto B:V)
            {
             //   cerr<<B.size()<<endl;
                Xuli(B);
            }
        cout<<"NO";
    }
}

int32_t main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    if (ifstream("test.txt"))
    {
        freopen("test.txt", "r", stdin);
        #ifdef CHECKING
            freopen(taskname".out", "w", stdout);
        #else
            //\freopen("test.out", "w", stdout);
        #endif //CHECKING
    }
    else if (ifstream(taskname".inp"))
    {
        freopen(taskname".inp", "r", stdin);
        freopen(taskname".out", "w", stdout);
    }
    int t=1;
    //cin>>t;
    while(t--)
    {
        Main();
    }
}
/*
CODE2976
wibu()
{
    return 0;
}
*/