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>
#include<unordered_map>
using namespace std;
const int N = 250010;
vector<int> a[N];
vector<bool> b[N];
vector<int> g[N];
vector<int> id[N];
int n, m;
int cnt[N];
int diff[N];
int d1[N], d2[N];
map<int, int> M;
int Check() {
	bool fl = 0;
	for (int i = 2; i <= n; i++) {
		for (int j = 0; j < m; j++)
			if (a[1][j] != a[i][j]) diff[i]++, b[i].push_back(1); else b[i].push_back(0);
		if (diff[i] > 2) fl = 1;
	}
	if (!fl) return 1;
	int num = 0, mx = (n << 1) + m;
	for (int j = 0; j < m; j++) {
		int sz = 0;
		M.clear();
		for (int i = 1; i <= n; i++) {
			int x = a[i][j];
			int t = M[x];
			if (!t) {
				g[j].push_back(x);
				id[i].push_back(++sz);
				M[x] = sz;
				if (++num > mx) return 0;
			} else id[i].push_back(t);
		}
		cnt[j] = sz;
	}
	return -1;
}
void Print(int i, int x, int j, int y) {
	puts("Yes");
	x = max(x, 1); y = max(y, 1);
	for (int k = 0; k < m; k++) {
		if (k == i) printf("%d ", g[k][x - 1]);
		else if (k == j) printf("%d ", g[k][y - 1]);
		else printf("%d ", a[1][k]);
	}
}
void Solve() {										//O(n(min(n,m)^2))
	for (int i = 0; i < m; i++)			//only change once
		if (cnt[i] > 1) {
			bool fl = 0;
			int idx = 0;
			for (int k = 2; k <= n; k++) {
				int t = diff[k] - b[k][i];
				if (t <= 1) continue;
				if (t > 2) {
					fl = 1;
					break;
				}
				if (!idx) idx = id[k][i];
				else if (idx != id[k][i]) {
					fl = 1;
					break;
				}
			}
			if (fl) continue;
			Print(i, idx, i, idx);
			return;
		}
	unordered_map<int, bool> M;
	for (int i = 0; i < m; i++)		//change twice
		if (cnt[i] > 1)
		for (int j = i + 1; j < m; j++) 
			if (cnt[j] > 1) {
				memset(d1, 0, sizeof(int) * (cnt[i] + 1));
				memset(d2, 0, sizeof(int) * (cnt[j] + 1));
				M.clear();
				bool fl = 0;
				int ansx = 0, ansy = 0, tot = 0;
				for (int k = 2; k <= n; k++) {
					int t = diff[k] - b[k][i] - b[k][j];
					if (!t) continue;
					if (t > 2) {
						fl = 1;
						break;
					}
					tot++;
					if (t == 1) {
						if (M.find(id[k][i] * cnt[j] + id[k][j]) == M.end()) d1[id[k][i]]++, d2[id[k][j]]++;
					} else {
						if (!ansx) ansx = id[k][i], ansy = id[k][j];
						else if (ansx != id[k][i] || ansy != id[k][j]) {
							fl = 1;
							break;
						}
					}
				}
				if (fl) continue;
				if (ansx) {						//determined
					for (int k = 2; k <= n; k++) {
						int t = diff[k] - b[k][i] - b[k][j];
						if (t == 1 && ansx != id[k][i] && ansy != id[k][j]) {
							fl = 1;
							break;
						}
					}
					if (fl) continue;
					Print(i, ansx, j, ansy);
					return;
				} else {
					int id1 = 0, id2 = 0;
					for (int k = 1; k <= cnt[i]; k++)
						if (d1[k] >= 2) {
							if (id1) {
								fl = 1; break;
							}
							id1 = k;
						}
					for (int k = 1; k <= cnt[j]; k++)
						if (d2[k] >= 2) {
							if (id2) {
								fl = 1; break;
							}
							id2 = k;
						}
					if (fl) continue;
					if (id1 && id2) {
						for (int k = 2; k <= n; k++) {
							int t = diff[k] - b[k][i] - b[k][j];
							if (t == 1 && id1 != id[k][i] && id2 != id[k][j]) {
								fl = 1;
								break;
							}
						}
						if (fl) continue;
						Print(i, id1, j, id2);
						return;
					} else if (id1) {
						for (int k = 2; k <= n; k++) {
							int t = diff[k] - b[k][i] - b[k][j];
							if (t == 1 && id1 != id[k][i]) {
								if (!id2) id2 = id[k][j];
								else if (id2 != id[k][j]) {
									fl = 1;
									break;
								}
							}
						}
						if (fl) continue;
						Print(i, id1, j, id2);
						return;
					} else if (id2) {
						for (int k = 2; k <= n; k++) {
							int t = diff[k] - b[k][i] - b[k][j];
							if (t == 1 && id2 != id[k][j]) {
								if (!id1) id1 = id[k][i];
								else if (id1 != id[k][i]) {
									fl = 1;
									break;
								}
							}
						}
						if (fl) continue;
						Print(i, id1, j, id2);
						return;
					} else if (tot <= 2) {
						for (int k = 2; k <= n; k++) {
							int t = diff[k] - b[k][i] - b[k][j];
							if (t == 1) {
								if (!id1) id1 = id[k][i]; else id2 = id[k][j];
							}
						}
						Print(i, id1, j, id2);
						return;
					}
				}
		}
	puts("No");
}
int main() {
	scanf("%d%d", &n, &m);
	for (int i = 1; i <= n; i++)
		for (int j = 0; j < m; j++) {
			int x;
			scanf("%d", &x);
			a[i].push_back(x);
		}
	int fl = Check();
	if (!fl) {
		puts("No");
		return 0;
	} else
	if (fl == 1) {
		puts("Yes");
		for (int j = 0; j < m; j++) printf("%d ", a[1][j]);
			return 0;
	}
	Solve();
	return 0;
}