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>

using namespace std;
const int N=250010;

int n,m;
vector<int> a[N];

int check(vector<int> a,vector<int> b)
{
    int cnt=0;
    for(int i=0;i<m;i++)
        if(a[i]!=b[i])
            cnt++;
    return cnt;
}
//有三处不同时要进行的操作
bool modify(vector<int>& tmp,int pos)
{
    //假设现在答案是第一行的元素，那么答案必定是要改变一个值为另一个序列的值
    //还有可能还要改变一个值，但是我们暂时不知道要修改成什么，就先设为0
    //用新的序列去和所有序列比较，当不同数大于3的时候，就是不合理的
    //当不同数还是3的时候，如果这个时候存在0
    //那么将-1改成与当前序列这个位置相同的数，否则就是不合理的
    tmp[pos]=0;
    for(int i=0;i<n;i++)
    {
        int cnt=check(tmp,a[i]);
        if(cnt<=2) continue;//如果本来就是少于2个的，就不需要进行其他的操作
        else if(cnt>3) return 0;//说明这种操作是行不通的
        else
        {
            //此时的cnt是3
            if(tmp[pos]!=a[i][pos])
            {
                if(!tmp[pos])
                    tmp[pos]=a[i][pos];
                else return 0;
            }
            else return 0;
        }
    }
    if(!tmp[pos]) tmp[pos]=1;
    return 1;
}

bool check(vector<int> tmp)
{
    int cnt=0;
    for(int i=1;i<n;i++)
    {
        cnt=check(tmp,a[i]);
        if(cnt>2) return 0;
    }
    return 1;
}

void out(vector<int> t)
{
    puts("Yes");
    for(int i=0;i<m;i++)
    {
        if(i) printf(" ");
        printf("%d",t[i]);
    }
        
    puts("");
    exit(0);
}

int main()
{
    /*
    the incident altered at most two elements in every cppy
    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
    */
   cin>>n>>m;
   for(int i=0;i<n;i++)
        for(int j=0;j<m;j++)
        {
            int tmp;
            scanf("%d",&tmp);
            a[i].push_back(tmp);
        }
    int dir=0;
    for(int i=1;i<n;i++) dir=max(dir,check(a[0],a[i]));
    if(dir<=2)
    {
        out(a[0]);
    }
    else if(dir>4)
        puts("No");
    else
    {
        int cnt=0;
        for(int i=1;i<n;i++)
        {
            cnt=check(a[0],a[i]);
            if(cnt<=2) continue;
            else if(cnt==3)
            {
                //找一下不同的地方
                vector<int> pos;
                for(int j=0;j<m;j++)
                    if(a[0][j]!=a[i][j])
                        pos.push_back(j);
                //可以确定的是有三个地方是不一样的
                for(int t1=0;t1<3;t1++)
                    for(int t2=0;t2<3;t2++)
                    {
                        if(t1==t2) continue;
                        vector<int> tmp=a[0];
                        tmp[pos[t1]]=a[i][pos[t1]];
                        if(modify(tmp,pos[t2]))
                            out(tmp);
                    }
                return puts("No")*0;
            }
            else
            {
                vector<int> pos;
                for(int j=0;j<m;j++)
                    if(a[0][j]!=a[i][j])
                        pos.push_back(j);
                for(int j=0;j<m;j++)
                    if(a[0][j]!=a[i][j])
                        pos.push_back(j);
                for(int t1=0;t1<4;t1++)
                    for(int t2=0;t2<4;t2++)
                    {
                        vector<int> tmp=a[0];
                        tmp[pos[t1]]=a[i][pos[t1]];
                        tmp[pos[t2]]=a[i][pos[t2]];
                        if(check(tmp))
                            out(tmp);
                    }
                return puts("No")*0;
            }
        }
        
    }


    return 0;
}