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

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

    static class BPairs {
        public void solve(int testNumber, ScanReader in, PrintWriter out) {
            int n = in.scanInt();
            int m = in.scanInt();
            int hash[] = new int[n + 5];
            int arr[][] = new int[m][2];
            HashMap<Long, Integer> hm = new HashMap<>();

            for (int i = 0; i < m; i++) {
                int x = in.scanInt();
                int y = in.scanInt();
                if (x > y) {
                    int t = y;
                    y = x;
                    x = t;
                }

                hash[x]++;
                hash[y]++;
                long t = CodeX.compute_hash(x, y);
                if (hm.containsKey(t)) {
                    hm.put(t, hm.get(t) + 1);
                } else {
                    hm.put(t, 1);
                }


                arr[i] = new int[]{x, y};
            }

            int x = arr[0][0];
            int y = arr[0][1];

            boolean f = false;
            for (int i = 1; i <= n; i++) {
                long t;
                if (i < x)
                    t = CodeX.compute_hash(i, x);
                else
                    t = CodeX.compute_hash(x, i);


                if ((x != i) && (hash[i] + hash[x] - (hm.containsKey(t) ? hm.get(t) : 0)) == m) f = true;
            }


            for (int i = 1; i <= n; i++) {
                long t;
                if (i < y)
                    t = CodeX.compute_hash(i, y);
                else
                    t = CodeX.compute_hash(y, i);


                if ((y != i) && (hash[i] + hash[y] - (hm.containsKey(t) ? hm.get(t) : 0)) == m) f = true;
            }


            out.println(f ? "YES" : "NO");
        }

    }

    static class CodeX {
        public static long compute_hash(long a, long b) {
            return (((a * 1456973978l) % 8008808808808813l) + ((b * 234792734l) % 8008808808808813l)) % 8008808808808813l;
        }

    }

    static class ScanReader {
        private byte[] buf = new byte[4 * 1024];
        private int INDEX;
        private BufferedInputStream in;
        private int TOTAL;

        public ScanReader(InputStream inputStream) {
            in = new BufferedInputStream(inputStream);
        }

        private int scan() {
            if (INDEX >= TOTAL) {
                INDEX = 0;
                try {
                    TOTAL = in.read(buf);
                } catch (Exception e) {
                    e.printStackTrace();
                }
                if (TOTAL <= 0) return -1;
            }
            return buf[INDEX++];
        }

        public int scanInt() {
            int I = 0;
            int n = scan();
            while (isWhiteSpace(n)) n = scan();
            int neg = 1;
            if (n == '-') {
                neg = -1;
                n = scan();
            }
            while (!isWhiteSpace(n)) {
                if (n >= '0' && n <= '9') {
                    I *= 10;
                    I += n - '0';
                    n = scan();
                }
            }
            return neg * I;
        }

        private boolean isWhiteSpace(int n) {
            if (n == ' ' || n == '\n' || n == '\r' || n == '\t' || n == -1) return true;
            else return false;
        }

    }
}

