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.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;

import javafx.util.Pair;

import java.util.Arrays;
import java.util.HashMap;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
import java.util.Map;
import java.io.BufferedReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        EAlmostFaultTolerantDatabase solver = new EAlmostFaultTolerantDatabase();
        solver.solve(1, in, out);
        out.close();
    }

    static class EAlmostFaultTolerantDatabase {
        public void solve(int testNumber, FastScanner in, PrintWriter out) {
            int n = in.nextInt();
            int m = in.nextInt();
            int[][] grid = new int[n][m];
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    grid[i][j] = in.nextInt();
                }
            }

            Pair<Integer, Integer> pair = check(grid);
            if (pair.getValue() > 4) {
                out.println("No");
                return;
            }
            if (pair.getValue() <= 2) {
                out.println("Yes");
                printArr(grid[0], out);
                return;
            }


            List<Integer> list = new ArrayList<>();
            for (int i = 0; i < m; i++) {
                if (grid[0][i] != grid[pair.getKey()][i]) {
                    list.add(i);
                }
            }

            for (int i = 1; i < (1 << list.size()); i++) {
                List<Integer> one = new ArrayList<>();
                for (int j = 0; j < 4; j++) {
                    if ((i & (1 << j)) > 0) {
                        one.add(list.get(j));
                    }
                }
                if (one.size() > 2 || list.size() - one.size() > 2) continue;

                int[] tmp = new int[one.size()];
                for (int j = 0; j < one.size(); j++) {
                    tmp[j] = grid[0][one.get(j)];
                    grid[0][one.get(j)] = grid[pair.getKey()][one.get(j)];
                }

                if (check(grid).getValue() <= 2) {
                    out.println("Yes");
                    printArr(grid[0], out);
                    return;
                }

                for (int j = 0; j < one.size(); j++) {
                    grid[0][one.get(j)] = tmp[j];
                }

            }

            if (list.size() == 3) {
                Map<Integer, Integer>[] diff = new HashMap[m];
                Arrays.setAll(diff, i -> new HashMap<>());
                for (int i = 0; i < m; i++) {
                    for (int j = 0; j < n; j++) {
                        Integer num = diff[i].getOrDefault(grid[j][i], 0);
                        diff[i].put(grid[j][i], ++num);
                    }
                }
                List<Node>[] nodes = new ArrayList[m];
                Arrays.setAll(nodes, i -> new ArrayList<>());
                for (int i = 0; i < m; i++) {
                    int finalI = i;
                    diff[i].forEach((k, v) -> {
                        nodes[finalI].add(new Node(k, v));
                    });
                    nodes[i].sort((a, b) -> b.num - a.num);

                }

                for (int i = 1; i < (1 << list.size()); i++) {
                    List<Integer> one = new ArrayList<>();
                    for (int j = 0; j < 4; j++) {
                        if ((i & (1 << j)) > 0) {
                            one.add(list.get(j));
                        }
                    }
                    if (one.size() != 2) continue;

                    int[] tmp = new int[one.size()];

                    for (int j = 0; j < 3 && j < nodes[one.get(0)].size(); j++) {
                        int df = nodes[one.get(0)].get(j).index;
                        //}
                        //for (Integer df : diff[one.get(0)]) {
                        tmp[0] = grid[0][one.get(0)];
                        grid[0][one.get(0)] = df;
                        tmp[1] = grid[0][one.get(1)];
                        grid[0][one.get(1)] = grid[pair.getKey()][one.get(1)];

                        if (check(grid).getValue() <= 2) {
                            out.println("Yes");
                            printArr(grid[0], out);
                            return;
                        }

                        grid[0][one.get(0)] = tmp[0];
                        grid[0][one.get(1)] = tmp[1];

                    }
                    for (int j = 0; j < 3 && j < nodes[one.get(1)].size(); j++) {
                        int df = nodes[one.get(1)].get(j).index;
                        //for (Integer df : diff[one.get(1)]) {
                        tmp[1] = grid[0][one.get(1)];
                        grid[0][one.get(1)] = df;
                        tmp[0] = grid[0][one.get(0)];
                        grid[0][one.get(0)] = grid[pair.getKey()][one.get(0)];

                        if (check(grid).getValue() <= 2) {
                            out.println("Yes");
                            printArr(grid[0], out);
                            return;
                        }

                        grid[0][one.get(0)] = tmp[0];
                        grid[0][one.get(1)] = tmp[1];

                    }

                }
            }


            out.println("No");


        }

        private void printArr(int[] ints, PrintWriter out) {
            for (int i = 0; i < ints.length; i++) {
                out.print(ints[i] + " ");
            }
            out.println();
        }

        private Pair<Integer, Integer> check(int[][] grid) {
            int len = grid.length;
            int n = grid[0].length;
            int max = 0;
            int p = 0;
            for (int i = 1; i < len; i++) {
                int num = 0;
                for (int j = 0; j < n; j++) {
                    if (grid[i][j] != grid[0][j]) {
                        num++;
                    }
                }
                if (num > max) {
                    max = num;
                    p = i;
                }
            }
            return new Pair<>(p, max);

        }

        class Node {
            int index;
            int num;

            public Node(int index, int num) {
                this.index = index;
                this.num = num;
            }

        }

    }

    static class FastScanner {
        private BufferedReader in;
        private StringTokenizer st;

        public FastScanner(InputStream stream) {
            in = new BufferedReader(new InputStreamReader(stream));
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(in.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}