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.
/*
 * Remember a 6.72 student can know more than a 10.0 student.
 * Grades don't determine intelligence, they test obedience. 
 * I Never Give Up.
 * I will become Candidate Master today.
 * I will defeat Saurabh Anand.
 * Skills are Cheap,Passion is Priceless.
 */
import java.util.*;
import java.util.Map.Entry;
import java.io.*;

import static java.lang.System.out;
import static java.util.Arrays.*;
import static java.lang.Math.*;
 
public class ContestMain{
	private static Reader in=new Reader();
	private static StringBuilder ans=new StringBuilder();
	private static long MOD=(long)1e9+7;
	private static final int N=(int) (1e6+7); // 1e5+7
    private static ArrayList<Integer> v[]=new ArrayList[N];
	private static boolean mark[]=new boolean[N];
//    private static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	private static long powmod(long x,long n){
		if(n==0||x==0)
			return 1;
		else if(n%2==0)
			return(powmod((x*x)%MOD,n/2));
		else
			return (x*(powmod((x*x)%MOD,(n-1)/2)))%MOD;
	}
	private static void shuffle(long[] arr){
		for(int i=arr.length-1;i>=2;i--){
			int x=new Random().nextInt(i-1);
			long temp=arr[x];
			arr[x]=arr[i];
			arr[i]=temp;
		}
	}
	private static void shuffle(int[] arr){
		for(int i=arr.length-1;i>=2;i--){
			int x=new Random().nextInt(i-1);
			int temp=arr[x];
			arr[x]=arr[i];
			arr[i]=temp;
		}
	}
    private static long gcd(long a, long b){
        if(b==0)return a;
        return gcd(b,a%b);
    }
//    private static boolean check(int x,int y){
//        if((x>=0&&x<n)&&(y>=0&&y<m)&&mat[x][y]!='X'&&!visited[x][y])return true;
//        return false;
//    }
    
	public static void main(String[] args) throws IOException{
		int n=in.nextInt();
		int m=in.nextInt();
		Pair ar[]=new Pair[m];
		int cnt[]=new int[n+1];
		for(int i=0;i<m;i++){
			ar[i]=new Pair(in.nextInt(),in.nextInt());
			cnt[ar[i].l]++;
			cnt[ar[i].r]++;
		}
		HashMap<String,Integer> map=new HashMap();
		int ca=ar[0].l;
		for(int i=0;i<m;i++){
			if(ar[i].l==ca){
				if(map.containsKey(ca+""+ar[i].r))map.put(ca+""+ar[i].r,map.get(ca+""+ar[i].r)+1);
				else map.put(ca+""+ar[i].r,1);
			}
			else if(ar[i].r==ca){
				if(map.containsKey(ca+""+ar[i].l))map.put(ca+""+ar[i].l,map.get(ca+""+ar[i].l)+1);
				else map.put(ca+""+ar[i].l,1);
			}
		}
		int total=0;
		for(int i=1;i<=n;i++){
			if(i==ca)continue;
			total=cnt[ca]+cnt[i];
			if(map.containsKey(ca+""+i))total-=map.get(ca+""+i);
			if(total==m){pn("YES");return;}
		}
		map.clear();
		ca=ar[0].r;
		for(int i=0;i<m;i++){
			if(ar[i].l==ca){
				if(map.containsKey(ca+""+ar[i].r))map.put(ca+""+ar[i].r,map.get(ca+""+ar[i].r)+1);
				else map.put(ca+""+ar[i].r,1);
			}
			else if(ar[i].r==ca){
				if(map.containsKey(ca+""+ar[i].l))map.put(ca+""+ar[i].l,map.get(ca+""+ar[i].l)+1);
				else map.put(ca+""+ar[i].l,1);
			}
		}
		total=0;
		for(int i=1;i<=n;i++){
			if(i==ca)continue;
			total=cnt[ca]+cnt[i];
			if(map.containsKey(ca+""+i))total-=map.get(ca+""+i);
			if(total==m){pn("YES");return;}
		}
		pn("NO");
	}
	static class Pair<T> implements Comparable<Pair>{
		int l;
		int r;
		Pair(){
			l=0;
			r=0;
		}
		Pair(int k,int v){
			l=k;
			r=v;
		}
		@Override
		public int compareTo(Pair o){
			if(l!=o.l)return (int)(l-o.l);
			return (int)(r-o.r);
		}
		// Fenwick tree question comparator
//        @Override
//        public int compareTo(Pair o) {
//            if(o.r!=r)return (int) (r-o.r);
//            else return (int)(l-o.l);
//        }
	}
	//Reader Class
	static class Reader{
		BufferedReader br;
		StringTokenizer st;
		public Reader(){br=new BufferedReader(new InputStreamReader(System.in));}
		String next(){
			while(st==null||!st.hasMoreElements()){
				try{st=new StringTokenizer(br.readLine());
				}catch(IOException e){e.printStackTrace();}
			}
			return st.nextToken();
		}
		int nextInt(){return Integer.parseInt(next());}
		long nextLong(){return Long.parseLong(next());}
		double nextDouble(){return Double.parseDouble(next());}
		String nextLine(){
			String str="";
			try{
				str=br.readLine();
			}catch(IOException e){
				e.printStackTrace();
			}
			return str;
		}
	}
	//Printer Methods
	static void pn(Object o){out.print(o);}
	static void pln(Object o){out.println(o);}
	static void pln(){out.println();}
	static void pf(String format,Object o){out.printf(format,o);}
	//Appenders
	static void app(Object o){ans.append(o);}
}