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>
using namespace std;
#define MOD 1000000007
#define ll long long
#define mp make_pair
#define ff first
#define ss second
#define pb push_back
#define INF 1e18
#define pr 998244353
#define endl "\n"

vector <ll> v;
vector <ll> a;
ll n,m;
vector <vector <ll>> arr;

bool solve(int rem)
{
    vector <int> temp;
    vector <int> orig;
    for(auto i:a)orig.pb(i);

    //for(auto i:a)cout<<i<<" ";cout<<endl;
    if(rem==0){
        for(int i=0;i<n;i++){
        for(int j=0;j<m;j++){
            if(arr[i][j]!=a[j]){
                temp.pb(j);
            }
        }

        if(temp.size()<=2){
            temp.clear();
            continue;
        }
        else return false;
    }
    return true;
    }
    if(rem==1)
    {
        bool ans1=solve(0);
        if(ans1)return true;

        for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                if(arr[i][j]!=a[j]){
                    temp.pb(j);
                }
            }
            if(temp.size()<=2){
                temp.clear();
                continue;
            }
            else if(temp.size()>3)return false;
            else{
                bool ans=false;
                for(int l=0;l<temp.size();l++){
                 a[temp[l]]=arr[i][temp[l]];
                    ans=solve(0);
                    if(ans)return true;
                    a[temp[l]]=orig[temp[l]];
                }
                return false;
            }

        }


    }
    
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    
    cin>>n>>m;
    arr.resize(n,vector <ll> (m,0));

    for(int i=0;i<n;i++){
        for(int j=0;j<m;j++){
            cin>>arr[i][j];
        }
    }

    for(int i=0;i<m;i++)a.pb(arr[0][i]);

    int f=0;

    for(int i=1;i<n;i++){

        for(int j=0;j<m;j++){
            if(arr[i][j]!=arr[0][j]){
                v.pb(j);
            }
        }

        if(v.size()<=2){
                v.clear();
                continue;
            }

            if(v.size()>4){
                f=1;
                break;
            }

            bool ans=false;
            //cout<<v.size()<<" ";

            for(int k=0;k<v.size();k++){
                for(int l=k;l<v.size();l++){
                    //cout<<l<<" "<<k<<endl;
                    if(l==k && v.size()!=4){
                        a[v[l]]=arr[i][v[l]];
                        ans=solve(1);
                        if(ans)break;
                        a[v[l]]=arr[0][v[l]];
                    }
                    else if(l==k) continue;
                    else{
                        a[v[l]]=arr[i][v[l]];
                        a[v[k]]=arr[i][v[k]];
                        ans=solve(0);
                        if(ans)break;
                        a[v[l]]=arr[0][v[l]];
                        a[v[k]]=arr[0][v[k]];
                    }

                }

                if(ans)break;
            }

            v.clear();
            if(!ans)
            f=1;
            break;
    }

    if(f){
        cout<<"No"<<endl;
    }
    else{
        cout<<"Yes"<<endl;
        for(auto i:a)cout<<i<<" ";cout<<endl;
    }


}