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.
//package clipse;


import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Random;
import java.util.StringTokenizer;
import java.io.*;
import java.math.*;
// alt+shift+r

public class cc
{
	
	static ArrayList<ArrayList<Integer>>graph;
	static long coin=0;
	static boolean visited[];
	static int color[];
	static int A[];
	static dsu dsu;
	static long cc=0;
	
	
	 public static void main(String[] args)
	    {
		int n=i();
		int m=i();
		int x[]=new int[m];
		int y[]=new int[m];
		for(int i=0;i<m;i++)
		{
			x[i]=i();
			y[i]=i();
		}
		
		
		
		int x1=x[0];int y1=y[0];
		int flag1=-1;
		int ans1=-1;
		
		
		int flag2=-2;
		int ans2=-1;
		
		
		
		
		ArrayList<Integer>l1=new ArrayList<>();
		ArrayList<Integer>l2=new ArrayList<>();
		
		for(int i=0;i<m;i++)
		{
			if(x[i]!=x1&&y[i]!=x1)
			{
				l1.add(i);
			}
		}
		
		if(l1.size()>=1)
		{
			int ax=x[l1.get(0)];
			int ay=y[l1.get(0)];
			
			//if ax==ans
			int c1=0;
			for(int ind:l1)
			{
				if(ax==x[ind]||ax==y[ind])
					c1++;
			}
			
			
			
			
			int c2=0;
			for(int ind:l1)
			{
				if(ay==x[ind]||ay==y[ind])
					c2++;
			}
			
			
			if(c1==l1.size())
			{
				flag1=1;
				ans1=ax;
			}
			else if(c2==l1.size())
			{
				flag1=1;
				ans1=ay;
			}
			
			
		}
		else
			flag1=1;
		
		
		
		
		
		
		
		
		
		
		
		
	//not contian y1	
		
		if(flag1==-1) {
			
		for(int i=0;i<m;i++)
		{
			if(x[i]!=y1&&y[i]!=y1)
			{
				l2.add(i);
			}
		}
		
		
		if(l2.size()>=1)
		{
			int ax=x[l2.get(0)];
			int ay=y[l2.get(0)];
			
			//if ax==ans
			int c1=0;
			for(int ind:l2)
			{
				if(ax==x[ind]||ax==y[ind])
					c1++;
			}
			
			
			
			int c2=0;
			for(int ind:l2)
			{
				if(ay==x[ind]||ay==y[ind])
					c2++;
			}
			
			if(c1==l2.size())
			{
				flag2=1;
				ans2=ax;
			}
			else if(c2==l2.size())
			{
				flag2=1;
				ans2=ay;
			}
			
			
		}
		else
			flag2=1;
		}
		
		if(flag1==1)
			System.out.println("YES");
		else if(flag2==1)
			System.out.println("YES");
		else
			System.out.println("NO");
		
		
		
		
		
		 
		 
	    }
	 
//*******************************************************************DISJOINT SET UNION****************************************************************************************************************************************************************//	 
	
	 
	 static class dsu
	 {
		 int parent[];
		 int size[];
		 dsu(int n)
		 {
			 parent=new int[n+1];
			 size=new int[n+1];
			 for(int i=0;i<=n;i++) 
			 {
				 parent[i]=-1;
			 	size[i]=1;
			 }
		 }
		 int find(int a)
		 {
			 if(parent[a]<0)
				 return a;
			 else {
				 int x=find(parent[a]);
				 parent[a]=x;
				 return x;
				 
			 }
		 }
		 void union(int a,int b)
		 {
			a=find(a);
			 b=find(b);
			 
			if(a==b)return;
			
			parent[b]=a;
		 }
		 
		 
		 
	 }
	 
	 
//*******************************************PRIME FACTORIZE *****************************************************************************************************//
	 static TreeMap<Integer,Integer> prime(long n)
	 {
		 TreeMap<Integer,Integer>h=new TreeMap<>();
		 long num=n;
		 for(int i=2;i<=Math.sqrt(num);i++)
		 {
			 if(n%i==0)
			 {
				 int nt=0;
				 while(n%i==0) {
					 n=n/i;
					 nt++;
				 }
				 h.put(i, nt);
			 }
		 }
		 if(n!=1)
			 h.put((int)n, 1);
		 return h;
		 
	 }
	 
	
	
//*************CLASS PAIR ***********************************************************************************************************************************************
	    static class pair {
	        int x;
	        int y;

	        pair(int x, int y) {
	            this.x = x;
	            this.y = y;
	        }
	    }
//*************CLASS PAIR *****************************************************************************************************************************************************
	
	
	

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

        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 Int() {
            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;
        }

        public String String() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            return String();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0)
                    writer.print(' ');
                writer.print(objects[i]);
            }
        }

        public void printLine(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

        public void flush() {
            writer.flush();
        }
    }

    static InputReader in = new InputReader(System.in);
    static OutputWriter out = new OutputWriter(System.out);
    static int modulus = (int) (1e9+7);

    public static int[] sort(int[] a) {
        int n = a.length;
        ArrayList<Integer> l = new ArrayList<>();
        for (int i : a)
            l.add(i);
        Collections.sort(l);
        for (int i = 0; i < l.size(); i++)
            a[i] = l.get(i);
        return a;
    }

    public static long pow(long x, long y) {
        long res = 1;
        while (y > 0) {
            if (y % 2 != 0) {
                res = (res * x) % modulus;
                y--;

            }
            x = (x * x) % modulus;
            y = y / 2;
        }
        return res;
    }
//GCD___+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    public static long gcd(long x, long y) {
        if (x == 0)
            return y;
        else
            return gcd(y % x, x);
    }
    //****************LOWEST COMMON MULTIPLE   *************************************************************************************************************************************

    public static long lcm(long x, long y) {
        return (x * (y / gcd(x, y)));
    }
//INPUT PATTERN******************************************************************************************************************************************************************
    public static int i() {
        return in.Int();
    }

    public static long l() {
        String s = in.String();
        return Long.parseLong(s);
    }

    public static String s() {
        return in.String();
    }

    public static int[] readArray(int n) {
        int A[] = new int[n];
        for (int i = 0; i < n; i++) {
            A[i] = i();
        }
        return A;
    }

    public static long[] readArray(long n) {
        long A[] = new long[(int) n];
        for (int i = 0; i < n; i++) {
            A[i] = l();
        }
        return A;
    }

}






	