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

Solution:
import io
import os

from collections import Counter, defaultdict, deque


from itertools import product


# Similar to https://codeforces.com/contest/1360/submission/81330345
def solve(N, M, A):
    def getDiff(w1, w2):
        return [i for i in range(M) if w1[i] != w2[i]]

    def fourDiffAnswer(word1, word2, indices):
        # If exactly 4 differences, can restore original array:
        # aboo
        # oocd
        assert len(indices) == 4
        w1 = list(word1)
        numIndices = len(indices)
        for mask in range(1 << numIndices):
            # do
            for pos, i in enumerate(indices):
                if (mask >> pos) & 1:
                    w1[i] = word1[i]
                else:
                    w1[i] = word2[i]
            # check
            if len(getDiff(w1, word1)) <= 2 and len(getDiff(w1, word2)) <= 2:
                if all(len(getDiff(w1, w2)) <= 2 for w2 in A):
                    return w1
            # undo
            for i in indices:
                w1[i] = word1
        return False

    def threeDiffAnswer(word1, word2, indices):
        # If 3 differences, can restore up to 1 unknown
        # abo
        # ocd
        assert len(indices) == 3
        w1 = list(word1)
        numIndices = len(indices)
        for unknownIndex in indices:
            for mask in range(1 << numIndices):
                # do
                for pos, i in enumerate(indices):
                    if (mask >> pos) & 1:
                        w1[i] = word1[i]
                    else:
                        w1[i] = word2[i]
                    if i == unknownIndex:
                        w1[i] = -1

                # check
                good = True
                cand = set()
                for w2 in A:
                    diffs = getDiff(w1, w2)
                    if len(diffs) > 3:
                        # No value of unknown will work
                        good = False
                        break
                    if len(diffs) == 3:
                        # Forced unknown to be this
                        cand.add(w2[unknownIndex])
                if len(cand) > 1:
                    good = False
                if good:
                    if len(cand) == 1:
                        w1[unknownIndex] = next(iter(cand))
                    else:
                        w1[unknownIndex] = 1

                    assert all(len(getDiff(w1, w2)) <= 2 for w2 in A)
                    return w1

                # undo
                for i in indices:
                    w1[i] = word1
        return False

    def formatAnswer(ans):
        if not ans:
            return "No"
        return "Yes\n" + " ".join(map(str, ans))

    w1 = A[0]
    mostDiff = (0,)
    for j in range(1, N):
        w2 = A[j]
        indices = getDiff(w1, w2)
        if len(indices) > 4:
            return "No"
        elif len(indices) == 4:
            return formatAnswer(fourDiffAnswer(w1, w2, indices))
        elif len(indices):
            mostDiff = max(mostDiff, (len(indices), j))
    if mostDiff[0] <= 2:
        # First word is usable
        return formatAnswer(w1)

    assert mostDiff[0] == 3
    w2 = A[mostDiff[1]]
    return formatAnswer(threeDiffAnswer(w1, w2, getDiff(w1, w2)))


DEBUG = False
if DEBUG:
    import random

    random.seed(10)
    for _ in range(1000000):
        M = random.randint(1, 10)
        orig = [0] * M
        N = random.randint(1, 10)
        A = []
        for i in range(N):
            copy = list(orig)
            i1 = random.randint(0, M - 1)

            i2 = random.randint(0, M - 1)
            copy[i1] = random.randint(0, 10)
            copy[i2] = random.randint(0, 10)
            A.append(copy)

        ans = solve(N, M, A)
        assert not ans.startswith("No")

    exit()


if __name__ == "__main__":
    input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

    TC = 1
    for tc in range(1, TC + 1):
        N, M = [int(x) for x in input().split()]
        S = [[int(x) for x in input().split()] for i in range(N)]
        ans = solve(N, M, S)
        print(ans)