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 <ext/pb_ds/assoc_container.hpp>
 #include <ext/pb_ds/priority_queue.hpp>

 using namespace __gnu_pbds;


__gnu_pbds::priority_queue<int, less<int>> pq;
gp_hash_table<int, int> mp;
*/

/** Begin fast allocation */
/*
const int mx_MEM = 10 * 1e7;
int mpos = 0;
char mem[mx_MEM];

inline void *operator new(size_t n) {
    assert((mpos += n) <= mx_MEM);
    return (void *) (mem + mpos - n);
}

inline void operator delete(void *) noexcept {} // must have!
*/
/** End fast allocation */

/** Pragmas */
// mt19937 gen(2281337);

//#pragma GCC optimize("O3", "Ofast", "unroll-loops", "unswitch-loops", "fast-math", "no-stack-protector")

//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,abm,mmx,avx")
// sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,abm,mmx,
//#pragma comment(linker, "/STACK:66777216")

/*
 * @author kamil.sharipov
 */

#include <bits/stdc++.h>

//#define int long long
#define all(x) (x).begin(), (x).end()
#define fo(i, a, b) for (int i = a; i < b; ++i)
#define ll long long
#define pii pair<int, int>

using namespace std;

int n, m;
vector<vector<int> > vt;

vector<int> ans;

void stop() {
    cout << "Yes\n";
    for (int i = 0; i < m; ++i) {
        if (ans[i] == 0) ans[i] = 1;
        cout << ans[i] << " ";
    }
    exit(0);
}

void ch_tr(vector<int> &cnt) {
    for (int i = 0; i < n; ++i) {
        if (cnt[i] > 2) return;
    }
    stop();
}

void sm(int pos, vector<int> &cnt, int delta) {
    for (int i = 0; i < n; ++i) {
        if (vt[i][pos] != ans[pos]) cnt[i] += delta;
    }
}

void ch(int x, int y, vector<int> &cnt) {


    for (int i = 0; i < n; ++i) {
        if (cnt[i] > 2) return;
        if (cnt[i] == 2) {
            ans[x] = vt[i][x];
            ans[y] = vt[i][y];
            sm(x, cnt, 1);
            sm(y, cnt, 1);
            ch_tr(cnt);
            sm(x, cnt, -1);
            sm(y, cnt, -1);
            return;
        }
        if (cnt[i] == 1) {
            ans[x] = vt[i][x];
            sm(x, cnt, 1);
            bool ch = true;
            for (int j = 0; j < n; ++j) {
                if (cnt[j] > 2) ch = false;
                if (cnt[j] == 2) {
                    ans[y] = vt[j][y];
                    sm(y, cnt, 1);
                    ch_tr(cnt);
                    sm(y, cnt, -1);
                    ch = false;
                    break;
                }
            }
            if (ch) stop();
            sm(x, cnt, -1);

            ans[y] = vt[i][y];
            sm(y, cnt, 1);
            ch = true;
            for (int j = 0; j < n; ++j) {
                if (cnt[j] > 2) ch = false;
                if (cnt[j] == 2) {
                    ans[x] = vt[j][x];
                    sm(x, cnt, 1);
                    ch_tr(cnt);
                    sm(x, cnt, -1);
                    ch = false;
                    break;
                }
            }

            if (ch) stop();
            sm(y, cnt, -1);
            return;
        }
    }
    stop();
}

void build(int i, int j) {

    vector<int> cnt(n, 0);

    for (int k = 0; k < m; ++k) {
        if (k == j) continue;
        ans[k] = vt[i][k];
        sm(k, cnt, 1);
    }

    int lst = -1;
    for (int k = 0; k < m; ++k) {
        if (k == j) continue;
        if (lst != -1) {
            ans[lst] = vt[i][lst];
            sm(lst, cnt, 1);
        }

        sm(k, cnt, -1);

        ch(j, k, cnt);
        lst = k;
    }
}

signed main() {
#ifdef _LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif

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

    ans.resize(m);
    if (m == 1) stop();
    bool c = true;
    for (int j = 0; j < m && c; ++j) {
        ans[j] = vt[0][j];
        for (int i = 1; i < n; ++i) {
            if (vt[i][j] != vt[i - 1][j]) {
                build(i - 1, j);;
                build(i, j);
                c = false;
                break;
            }
        }
    }
    if (c) stop();
    else cout << "No\n";
}