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.util.InputMismatchException;
import java.io.IOException;
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;
        InputReader in = new InputReader(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, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int m = in.nextInt();
            int[] count = new int[n + 1];
            int[][] inf = new int[m][2];
            int mc = 0;
            int vc = 0;
            for (int i = 0; i < m; i++) {
                int a = in.nextInt();
                int b = in.nextInt();
                inf[i][0] = a;
                inf[i][1] = b;
                count[a]++;
                count[b]++;
            }

            for (int i = 0; i <= n; i++) {
                if (count[i] > mc) {
                    mc = count[i];
                    vc = i;
                }
            }

            int x = -1;
            int y = -1;
            boolean noway = false;
            for (int i = 0; i < m; i++) {
                if (inf[i][0] == vc || inf[i][1] == vc) {
                    count[inf[i][0]]--;
                    count[inf[i][1]]--;
                    if (x == ((inf[i][0] == vc) ? inf[i][1] : inf[i][0]) || y == ((inf[i][0] == vc) ? inf[i][1] : inf[i][0]))
                        continue;

                    if (x == -1) {
                        x = (inf[i][0] == vc) ? inf[i][1] : inf[i][0];
                    } else if (y == -1) {
                        y = (inf[i][0] == vc) ? inf[i][1] : inf[i][0];
                    } else {
                        noway = true;
                    }
                }
            }

            int left = m - mc;
            for (int i = 0; i <= n; i++) {
                if (count[i] >= left) {
                    out.println("YES");
                    return;
                }
            }

            if (noway) {
                out.println("NO");
            } else {
                for (int i = 0; i < m; i++) {
                    if (!(inf[i][0] == x || inf[i][1] == x || inf[i][0] == y || inf[i][1] == y)) {
                        noway = true;
                    }
                }
                if (noway) {
                    out.println("NO");
                } else {
                    out.println("YES");
                }
            }
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}

