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.*;
import java.lang.reflect.Array;
import java.util.*;

public class Main {
    static class FastScanner {
        private BufferedReader bufferedReader;
        private StringTokenizer stringTokenizer;
        public FastScanner(InputStream inputStream){
            bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
        }
        public String next() {
            while (stringTokenizer == null || !stringTokenizer.hasMoreTokens()){
                try {
                    stringTokenizer = new StringTokenizer(bufferedReader.readLine());
                } catch (IOException ignored){}
            }
            return stringTokenizer.nextToken();
        }
        public int nextInt() {
            return Integer.parseInt(next());
        }
        public long nextLong() {
            return Long.parseLong(next());
        }
        public double nextDouble() {
            return Double.parseDouble(next());
        }
    }

    static class Node implements Comparable {
        Node left;
        Node right;
        private int value;

        Node(Node left, Node right, int value) {
            this.left = left;
            this.right = right;
            this.value = value;
        }

        @Override
        public int compareTo(Object o) {
            return Integer.compare(this.value, ((Node)o).value);
        }
    }

    private static int fib(int n, int m){
        if (n < 2) return n;
        int a = 0;
        int b = 1;
        for (int i=0;i<n-2;i++){
            int c = (a + b) % m;
            a = b;
            b = c;
        }
        return (a + b) % m;
    }

    static long gcd(long a, long b) {
        if (b == 0) return a;
        return gcd(b, a % b);
    }

    static long lcm(long a, long b) {
        return Math.abs(a * b) / gcd(a, b);
    }

    static class DSU {
        private int [] p;
        private int [] r;

        DSU(int n) {
            p = new int[n];
            r = new int[n];
            Arrays.fill(p, -1);
            Arrays.fill(r, 0);
        }

        int find(int x) {
            if (p[x] < 0) {
                return x;
            }
            return p[x] = find(p[x]);
        }

        void union(int a, int b) {
            a = find(a);
            b = find(b);
            if (a == b) return;
            if (r[a] < r[b]) {
                p[a] = b;
            }
            else {
                p[b] = a;
            }
            if (r[a] == r[b]) {
                r[a] ++;
            }
        }
    }

    private static boolean isPrime(long n) {
        for (int i = 2; i < n; i++) {
            if (n % i == 0) return false;
        }
        return true;
    }

    private static final int N = (int) 10e5 + 1;
    private static final long MOD = 1000000007;

    private static long []dp = new long[N];
    private static long []dp2 = new long[N];

    static {
        Arrays.fill(dp, -1);
        Arrays.fill(dp2, 0);
    }

    private static long cnt(int n, int k) {
        if (dp[n] == -1) {
            if (n < k) dp[n] = 1;
            else dp[n] = (cnt(n-1, k) + cnt(n-k, k)) % MOD;
        }
        return dp[n] % MOD;
    }

    private static ArrayList<Map.Entry<Integer, Integer>>exclude(ArrayList<Map.Entry<Integer, Integer>>a, int x) {
        ArrayList<Map.Entry<Integer, Integer>>b = new ArrayList<>(a.size());
        for (int i = 0; i < a.size(); i++) {
            if (a.get(i).getValue() == x || a.get(i).getKey() == x) continue;
            b.add(a.get(i));
        }
        return b;
    }

    public static void main(String[] args){
        FastScanner scanner = new FastScanner(System.in);
        PrintWriter printer = new PrintWriter(System.out);
//        int n = scanner.nextInt(), x = scanner.nextInt(), k = scanner.nextInt();
//        Integer a[] = new Integer[n];
//        for (int i = 0; i < n; i++) {
//            a[i] = scanner.nextInt();
//        }
//        Arrays.sort(a);
//        Set<Integer>used = new HashSet<>();
//        List<Integer>b = new ArrayList<>(n);
//        for (int i = 0; i < n; i++) {
//            int m = a[i] % x;
//            if (!used.contains(m)) {
//                used.add(m);
//                b.add(a[i]);
//            }
//        }
//        int m = b.size();
//        int max = b.get(b.size() - 1);
//        ArrayList<Integer>c = new ArrayList<>();
//        for (int i = 0; i < m; i++) {
//            while(b.get(i) + x < max) {
//                c.add(b.get(i));
//                b.set(i, b.get(i) + x);
//            }
//        }
//        c.sort(Integer::compareTo);
//        b.sort(Integer::compareTo);
//        if (k <= c.size()) {
//            printer.println(c.get(k - 1));
//        }
//        else {
//            k-=c.size();
//            int d = k / m;
//            int ans;
//            if (k % m == 0) {
//                ans = b.get(b.size() - 1) * d;
//            }
//            else {
//                int o = k % m;
//                ans = b.get(0) * (d - 1) + b.get(o);
//            }
//            printer.println(ans);
//        }
//        //printer.println(c);
//        ///printer.println(b);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        ArrayList<Map.Entry<Integer, Integer>>a = new ArrayList<>(m);
        for (int i = 0; i < m; i++) {
            int x = scanner.nextInt();
            int y = scanner.nextInt();
            a.add(new AbstractMap.SimpleEntry<>(x,y));
        }
        int x1 = a.get(0).getKey();
        int x2 = a.get(0).getValue();
        ArrayList<Map.Entry<Integer, Integer>>b1 = exclude(a, x1);
        ArrayList<Map.Entry<Integer, Integer>>b2 = exclude(a, x2);
        if (b1.size() == 0 || b2.size() == 0) {
            printer.println("YES");
            printer.flush();
            printer.close();
            return;
        }
        int b1y1 = b1.get(0).getKey();
        int b1y2 = b1.get(0).getValue();
        int b2y1 = b2.get(0).getKey();
        int b2y2 = b2.get(0).getValue();
        ArrayList<Map.Entry<Integer, Integer>>c1 = exclude(b1, b1y1);
        ArrayList<Map.Entry<Integer, Integer>>c2 = exclude(b1, b1y2);
        ArrayList<Map.Entry<Integer, Integer>>c3 = exclude(b2, b2y1);
        ArrayList<Map.Entry<Integer, Integer>>c4 = exclude(b2, b2y2);
        if (c1.size() == 0 || c2.size() == 0 || c3.size() == 0 || c4.size() == 0) {
            printer.println("YES");
            printer.flush();
            printer.close();
            return;
        }
        printer.println("NO");
        printer.flush();
        printer.close();
    }
}