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 ll long long
#define ull unsigned long long
#define db double
#define pii pair<int,int>
#define pli pair<ll,int>
#define pil pair<int,ll>
#define pll pair<ll,ll>
#define ti3 tuple<int,int,int>
#define mat vector<vector<int>>
const int inf = 1 << 30;
const ll linf = 1e18;
const db EPS = 1e-7;
template<class T> void chmin(T& x, T y){if(x > y) x = y;}
template<class T> void chmax(T& x, T y){if(x < y) x = y;}

int main(){
    int n, m;
    cin >> n >> m;
    vector<vector<int>> tb(n, vector<int>(m));
    for(int i = 0; i < n; i++){
        for(int j = 0; j < m; j++){
            cin >> tb[i][j];
        }
    }

    int mx = 0;
    int nxt = 0;
    for(int i = 1; i < n; i++){
        int cnt = 0;
        for(int j = 0; j < m; j++){
            if(tb[0][j] != tb[i][j]) cnt++;
        }
        if(cnt > mx) mx = cnt, nxt = i;
    }

    vector<int> dif;
    for(int i = 0; i < m; i++){
        if(tb[0][i] != tb[nxt][i]) dif.push_back(i);
    }
    int sz = dif.size();
    if(sz > 4){
        cout << "No" << endl;
        return 0;
    }
    else{
        vector<int> ans = tb[0];
        for(int i = 0; i < (1 << sz); i++){
            int cd = 0;
            for(int j = 0; j < sz; j++){
                if((i >> j) & 1) ans[dif[j]] = tb[nxt][dif[j]];
                else ans[dif[j]] = tb[0][dif[j]];
                cd += (i >> j) & 1;
            }

            if(cd >= 3) continue;
            else if(cd == 2){
                bool flag = true;
                for(int j = 0; j < n; j++){
                    int cnt = 0;
                    for(int k = 0; k < m; k++){
                        if(ans[k] != tb[j][k]) cnt++;
                    }
                    if(cnt >= 3) flag = false;
                }
                if(flag){
                    cout << "Yes" << endl;
                    for(auto u : ans) cout << u << " ";
                    cout << endl;
                    return 0;
                }
            }else{
                bool flag = true;
                int r = 0;
                for(int j = 0; j < n; j++){
                    int cnt = 0;
                    for(int k = 0;k < m; k++){
                        if(ans[k] != tb[j][k]) cnt++;
                    }
                    if(cnt > 3){
                        flag = false;
                        break;
                    }
                    if(cnt == 3){
                        r = j;
                        break;
                    }
                }
                if(r != 0){
                    for(int j = 0; j < m; j++){
                        if(ans[j] != tb[r][j]){
                            flag = true;
                            int cp = ans[j];
                            ans[j] = tb[r][j];

                            for(int x = 0; x < n; x++){
                                int cnt = 0;
                                for(int y = 0; y < m; y++){
                                    if(ans[y] != tb[x][y]) cnt++;
                                }
                                if(cnt >= 3) flag = false;
                            }

                            if(flag){
                                cout << "Yes" << endl;
                                for(auto u : ans) cout << u << " ";
                                cout << endl;
                                return 0;
                            }
                            ans[j] = cp;
                        }
                    }
                }else if(flag){
                    cout << "Yes" << endl;
                    for(auto u : ans) cout << u << " ";
                    cout << endl;
                    return 0;
                }
            }
        }
    }
    cout << "No" << endl;
    return 0;
}