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 JAVA):

Solution:
import java.util.*;
import java.io.*;
 
public class codeforces {
	public static void main(String[] args) throws Exception {
 
		int n=sc.nextInt();
		int m=sc.nextInt();
		int[][]a=new int[n][m];
		int[]diff=new int[n];
		boolean[][]diffpos=new boolean[n][m];
		int ind=0;
		for(int i=0;i<n;i++) {
			
				for(int j=0;j<m;j++) {
					a[i][j]=sc.nextInt();
					if(i!=0) {
						diff[i]+=(a[i][j]==a[0][j]?0:1);
						diffpos[i][j]=(a[i][j]!=a[0][j]);
					}
				}
			
		}
		int maxdiff=0;
		for(int i=0;i<n;i++) {
			if(diff[i]>maxdiff) {
				ind=i;
			maxdiff=Math.max(maxdiff, diff[i]);
			}
		}
		if(maxdiff<=2) {
			pw.println("Yes");
			for(int i=0;i<m;i++) {
				pw.print(a[0][i]+" ");
			}
			pw.println();
		}else if(maxdiff==4) {
			boolean found=false;
			out: for(int i=0;i<(1<<4);i++) {
				int[]temp=new int[m];
				int cur=0;
				for(int j=0;j<m;j++) {
					if(diffpos[ind][j]) {
						if((i&(1<<cur))!=0) {
							temp[j]=a[0][j];
						}else {
							temp[j]=a[ind][j];
						}
						cur++;
					}else {
						temp[j]=a[0][j];
					}
				}
				int md=0;
				for(int j=0;j<n;j++) {
					int tedif=0;
					for(int k=0;k<m;k++) {
						tedif+=(a[j][k]==temp[k]?0:1);
					}
					md=Math.max(md, tedif);
				}
				if(md<=2) {
					pw.println("Yes");
					for(int k=0;k<m;k++) {
						pw.print(temp[k]+" ");
					}
					pw.println();
					found=true;
					break out;
				}
			}
			if(!found)pw.println("No");
		}else if(maxdiff==3) {
//			pw.println("*");
			boolean found=false;
			out: for(int i=0;i<3;i++) {
				int[]temp=new int[m];
				int cur=0;
				for(int j=0;j<m;j++) {
					if(diffpos[ind][j]) {
						if(i!=cur) {
							temp[j]=a[0][j];
						}else {
							temp[j]=a[ind][j];
						}
						cur++;
					}else {
						temp[j]=a[0][j];
					}
				}
//				pw.println(Arrays.toString(temp));
				int md=0;
				int jnd=0;
				for(int j=0;j<n;j++) {
					int tedif=0;
					for(int k=0;k<m;k++) {
						tedif+=(a[j][k]==temp[k]?0:1);
					}
					if(tedif>md) {
						jnd=j;
						md=Math.max(md, tedif);
					}
				}
//				pw.println(md);
				if(md<=2) {
					pw.println("Yes");
					for(int k=0;k<m;k++) {
						pw.print(temp[k]+" ");
					}
					pw.println();
					found=true;
					break out;
				}else if(md==3) {
					for(int j=0;j<3;j++) {
						int[]temp2=new int[m];
						int cur2=0;
						for(int k=0;k<m;k++) {
							if(a[jnd][k]!=temp[k]) {
								if(cur2==j) {
									temp2[k]=a[jnd][k];
								}else {
									temp2[k]=temp[k];
								}
									
								cur2++;
							}else {
								temp2[k]=temp[k];
							}
						}
//						pw.println(Arrays.toString(temp2));
						int md2=0;
						for(int jj=0;jj<n;jj++) {
							int tedif=0;
							for(int k=0;k<m;k++) {
								tedif+=(a[jj][k]==temp2[k]?0:1);
							}
							
								
								md2=Math.max(md2, tedif);
							
						}
//						pw.println("* "+md2);
						if(md2<=2) {
							pw.println("Yes");
							for(int k=0;k<m;k++) {
								pw.print(temp2[k]+" ");
							}
							pw.println();
							found=true;
							break out;
						}
					}
				}
			}
			if(!found)pw.println("No");
		}else {
			pw.println("No");
		}
		pw.close();
	}
 
	static class Scanner {
		StringTokenizer st;
		BufferedReader br;
 
		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}
 
		public Scanner(FileReader r) {
			br = new BufferedReader(r);
		}
 
		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
 
		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}
 
		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}
 
		public String nextLine() throws IOException {
			return br.readLine();
		}
 
		public double nextDouble() throws IOException {
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if (x.charAt(0) == '-') {
				neg = true;
				start++;
			}
			for (int i = start; i < x.length(); i++)
				if (x.charAt(i) == '.') {
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				} else {
					sb.append(x.charAt(i));
					if (dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg ? -1 : 1);
		}
 
		public long[] nextlongArray(int n) throws IOException {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextLong();
			return a;
		}
 
		public Long[] nextLongArray(int n) throws IOException {
			Long[] a = new Long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextLong();
			return a;
		}
 
		public int[] nextIntArray(int n) throws IOException {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}
 
		public Integer[] nextIntegerArray(int n) throws IOException {
			Integer[] a = new Integer[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}
 
		public boolean ready() throws IOException {
			return br.ready();
		}
 
	}
 
	static class pair implements Comparable<pair> {
		long x;
		long y;
 
		public pair(long x, long y) {
			this.x = x;
			this.y = y;
		}
 
		public String toString() {
			return x + " " + y;
		}
 
		public boolean equals(Object o) {
			if (o instanceof pair) {
				pair p = (pair) o;
				return p.x == x && p.y == y;
			}
			return false;
		}
 
		public int hashCode() {
			return new Double(x).hashCode() * 31 + new Double(y).hashCode();
		}
 
		public int compareTo(pair other) {
			if (this.x == other.x) {
				return Long.compare(this.y, other.y);
			}
			return Long.compare(this.x, other.x);
		}
	}
 
	static class tuble implements Comparable<tuble> {
		int x;
		int y;
		int z;
 
		public tuble(int x, int y, int z) {
			this.x = x;
			this.y = y;
			this.z = z;
		}
 
		public String toString() {
			return x + " " + y + " " + z;
		}
 
		public int compareTo(tuble other) {
			if (this.x == other.x) {
				if (this.y == other.y) {
					return this.z - other.z;
				}
				return this.y - other.y;
			} else {
				return this.x - other.x;
			}
		}
	}
 
	static long mod = 1000000007;
	static Random rn = new Random();
	static Scanner sc = new Scanner(System.in);
	static PrintWriter pw = new PrintWriter(System.out);
}