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:
/**
 *  created: 23/02/2021, 11:54:37
**/

#include <bits/stdc++.h>

using namespace std;

const int max_n = 250555, inf = 1000111222;

int n, m, cnt[max_n], real_cnt[max_n];
bool ok_col[max_n];
vector<int> a[max_n], ids;

void write(int col1, int col2, int val1, int val2) {
    vector<int> ans;
    for (int i = 0; i < m; ++i) {
        if (i == col1) {
            ans.push_back(val1);
        } else if (i == col2) {
            ans.push_back(val2);
        } else {
            ans.push_back(a[0][i]);
        }
    }
    for (int i = 0; i < n; ++i) {
        int cnt = 0;
        for (int j = 0; j < m; ++j) {
            cnt += a[i][j] != ans[j];
        }
        assert(cnt <= 2);
    }
    puts("Yes");
    for (int x : ans) {
        printf("%d ", x);
    }
    puts("");
    exit(0);
}

void solve(int col1, int col2) {
    for (int i = 1; i < n; ++i) {
        real_cnt[i] = cnt[i];
        real_cnt[i] -= a[i][col1] != a[0][col1];
        real_cnt[i] -= a[i][col2] != a[0][col2];
        if (real_cnt[i] > 2) {
            return;
        }
    }
    for (int i = 1; i < n; ++i) {
        if (real_cnt[i] == 2) {
            bool ok = 1;
            for (int j = 1; j < n; ++j) {
                int c = real_cnt[j];
                c += a[j][col1] != a[i][col1];
                c += a[j][col2] != a[i][col2];
                ok &= c <= 2;
            }
            if (ok) {
                write(col1, col2, a[i][col1], a[i][col2]);
            }
            return;
        }
    }
    int row1 = -1;
    for (int i = 1; i < n; ++i) {
        if (real_cnt[i] == 1) {
            row1 = i;
            break;
        }
    }
    if (row1 == -1) {
        write(col1, col2, 1, 1);
        return;
    }
    for (int it = 0; it < 2; ++it) {
        bool ok = 1;
        int need_val = -1;
        for (int i = 1; i < n; ++i) {
            int c = real_cnt[i];
            c += a[i][col1] != a[row1][col1];
            if (c > 2) {
                ok = 0;
                break;
            }
            if (c == 2) {
                if (need_val != -1 && need_val != a[i][col2]) {
                    ok = 0;
                    break;
                }
                need_val = a[i][col2];
            }
        }
        if (ok) {
            if (need_val == -1) {
                need_val = 1;
            }
            write(col1, col2, a[row1][col1], need_val);
            return;
        }
        swap(col1, col2);
    }
}

int main() {
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    scanf("%d%d", &n, &m);
    for (int i = 0; i < n; ++i) {
        a[i].resize(m);
        for (int &x : a[i]) {
            scanf("%d", &x);
        }
    }
    int cnt_ok = 0;
    for (int i = 0; i < m; ++i) {
        ok_col[i] = 1;
        for (int j = 0; j < n; ++j) {
            ok_col[i] &= a[j][i] == a[0][i];
        }
        cnt_ok += ok_col[i];
    }
    if (m - cnt_ok > 2 * n) {
        puts("No");
        return 0;
    }
    for (int i = 0; i < m; ++i) {
        if (!ok_col[i]) {
            ids.push_back(i);
        }
    }
    if (ids.size() <= 2) {
        write(-1, -1, -1, -1);
        return 0;
    }
    for (int i = 1; i < n; ++i) {
        for (int col : ids) {
            cnt[i] += a[i][col] != a[0][col];
        }
    }
    for (int i = 0; i < ids.size(); ++i) {
        for (int j = i + 1; j < ids.size(); ++j) {
            solve(ids[i], ids[j]);
        }
    }
    puts("No");
    return 0;
}