Toad Ivan has m pairs of integers, each integer is between 1 and n, inclusive. The pairs are (a_1, b_1), (a_2, b_2), …, (a_m, b_m). 

He asks you to check if there exist two integers x and y (1 ≤ x < y ≤ n) such that in each given pair at least one integer is equal to x or y.

Input

The first line contains two space-separated integers n and m (2 ≤ n ≤ 300 000, 1 ≤ m ≤ 300 000) — the upper bound on the values of integers in the pairs, and the number of given pairs.

The next m lines contain two integers each, the i-th of them contains two space-separated integers a_i and b_i (1 ≤ a_i, b_i ≤ n, a_i ≠ b_i) — the integers in the i-th pair.

Output

Output "YES" if there exist two integers x and y (1 ≤ x < y ≤ n) such that in each given pair at least one integer is equal to x or y. Otherwise, print "NO". You can print each letter in any case (upper or lower).

Examples

Input


4 6
1 2
1 3
1 4
2 3
2 4
3 4


Output


NO


Input


5 4
1 2
2 3
3 4
4 5


Output


YES


Input


300000 5
1 2
1 2
1 2
1 2
1 2


Output


YES

Note

In the first example, you can't choose any x, y because for each such pair you can find a given pair where both numbers are different from chosen integers.

In the second example, you can choose x=2 and y=4.

In the third example, you can choose x=1 and y=2.
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.*;
import java.lang.StringBuilder;

public class TestClass
{
    static class Reader
    {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException
        {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException
        {
            byte[] buf = new byte[1000]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1)
            {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
            {
                ret = ret * 10 + c - '0';
            }  while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public long nextLong() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }

        public double nextDouble() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();

            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');

            if (c == '.')
            {
                while ((c = read()) >= '0' && c <= '9')
                {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
                return -ret;
            return ret;
        }

        private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException
        {
            if (din == null)
                return;
            din.close();
        }
    }

    static int getIndex(int arr[],int val,int r){
        int l=0;
        while(true){
            int m=(l+r)/2;
            if(m==l)
            {
                if(arr[m]<val && arr[m+1]>=val)
                {
                    return m;
                }
                else if(arr[m]<val && arr[m+1]<val)
                {
                    return r;
                }
                else if(arr[m]>=val && arr[m+1]>=val)
                    return m-1;
//             if(m==0)
//             {
//                    return -1;
//             }
//             else
//                 return r-1;
            }
            if(arr[m]<val && arr[m+1]>=val)
            {
                return m;
            }
            else if(arr[m]>=val)
            {
                r=m;
            }
            else
            {
                l=m;
            }
        }

    }
    static void printArray(int a[]){
        int length=a.length;
        for(int i=0;i<length;i++){
            System.out.print(a[i]+" ");
        }
        System.out.println();
    }
    public static void main(String[] args) throws IOException
    {
        Reader s=new Reader();
        int n=s.nextInt();
        int m=s.nextInt();
        int pairs[][]=new int[m][2];
        int a,b,c,d;
        for(int i=0;i<m;i++){
            pairs[i][0]=s.nextInt();
            pairs[i][1]=s.nextInt();
        }
        int count[]=new int[n+1];
        a=pairs[0][0];
        b=pairs[0][1];
        int ct=0;
        for(int i=0;i<m;i++){
            if(!(a==pairs[i][0] || a==pairs[i][1])){
                
                count[pairs[i][0]]++;
                count[pairs[i][1]]++;
                ct++;
            }
        }
        for(int i=1;i<n+1;i++) {
            if (count[i] == ct) {
                System.out.println("YES");
                return;
            }
        }

         ct=0;
        count=new int[n+1];
        for(int i=0;i<m;i++){
            if(!(b==pairs[i][0] || b==pairs[i][1])){
                
                    count[pairs[i][0]]++;
                    count[pairs[i][1]]++;
                ct++;
            }
        }
        for(int i=1;i<n+1;i++) {
            if (count[i] == ct) {
                System.out.println("YES");
                return;
            }
        }

        System.out.println("NO");



    }
}

//outer: for(int q0=0;q0<q;q0++) {
//        long a = s.nextLong();
//        long b = s.nextLong();
//        long m = s.nextLong();
//        if(a==b)
//        {
//        System.out.println(1+" "+a);
//        continue;
//        }
//        if(a>b)
//        {
//        System.out.println("-1");
//        continue;
//        }
//        long div = b / a;
//        int i = (int) (Math.log(div) / Math.log(2));
//        if (b > Math.pow(2, i + 1) * a) {
//        i = i + 1;
//        } else if (b > Math.pow(2, i) * a) {
//        i = i;
//        } else if (b > Math.pow(2, i - 1) * a)
//        i = i - 1;
//        int i1=i;
//        for (i=0; i <=i1; i++) {
//        long remain = b - (long) Math.pow(2, i) * a;
//        int rounds = i + 2;
//        int terms = i + 1;
//        long coeff[] = new long[terms];
//        coeff[terms - 1] = 1;
//        int power = 0;
//        for (int j = terms - 2; j > -1; j--) {
//        coeff[j] = (long) Math.pow(2, power);
//        power++;
//        }
//        long min = (long) Math.pow(2, power);
//        long max = min * m;
//        if (!(remain >= min && remain <= max)) {
//        //System.out.println("-1");
//        if(i==i1)
//        System.out.println("-1");
//        continue;
//        }
//        long value[] = new long[terms];
//        Arrays.fill(value, m);
//        long todel = max - remain;
//        for (int j = 0; j < terms; j++) {
//        long delt = todel / coeff[j];
//        if (delt + 1 <= m) {
//        value[j] -= delt;
//        todel -= delt * coeff[j];
//        } else {
//        value[j] = 1;
//        todel -= (m - 1) * coeff[j];
//        }
//        if (todel == 0) {
//        break;
//        }
//        }
//        System.out.print(rounds + " " + a + " " + (a + value[0]) + " ");
//        long ans = a + value[0];
//        for (int j = 1; j < terms; j++) {
//        ans = (ans * 2) - value[j - 1] + value[j];
//        System.out.print(ans + " ");
//        }
//        System.out.println();
//        continue outer;
//        }
//        }
