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.util.*;

import java.io.*;

import java.math.*;
public class Solution implements Runnable{
    FastScanner sc;
    PrintWriter pw;
    final class FastScanner {
        BufferedReader br;
        StringTokenizer st;
 
        public FastScanner() {
            try {
                br = new BufferedReader(new InputStreamReader(System.in));
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
 
        public long nlo() {
            return Long.parseLong(next());
        }
 
        public String next() {
            if (st.hasMoreTokens()) return st.nextToken();
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                e.printStackTrace();
            }
            return st.nextToken();
        }
 
        public int ni() {
            return Integer.parseInt(next());
        }
 
        public String nli() {
            String line = "";
            if (st.hasMoreTokens()) line = st.nextToken();
            else try {
                return br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            while (st.hasMoreTokens()) line += " " + st.nextToken();
            return line;
        }
 
        public double nd() {
            return Double.parseDouble(next());
        }
    }
    public static void main(String[] args) throws Exception
    {
        new Thread(null,new Solution(),"codeforces",1<<28).start();
    }
    public void run()
    {
        sc=new FastScanner();
        pw=new PrintWriter(System.out);
        try{solve();}
        catch(Exception e)
        {System.out.println(e);}
        pw.flush();
        pw.close();
    }
    public long gcd(long a,long b)
    {
        return b==0L?a:gcd(b,a%b);
    }
    public long ppow(long a,long b,long mod)
    {
        if(b==0L)
        return 1L;
        long tmp=1;
        while(b>1L)
        {
            if((b&1L)==1)
            tmp*=a;
            a*=a;
            a%=mod;
            tmp%=mod;
            b>>=1;
        }
        return (tmp*a)%mod;
    }
    public  int gcd(int x,int y)
    {
        return y==0?x:gcd(y,x%y);
    }
    //////////////////////////////////
    /////////////  LOGIC  ///////////
    ////////////////////////////////

    public void solve() throws Exception
    {
      HashMap<Integer,HashSet<Integer>> map=new HashMap();
      int n=sc.ni();
      int M=sc.ni();
      HashSet<Integer>[] list=new HashSet[n+1];
      for(int i=1;i<=n;i++)
      list[i]=new HashSet();
      int m=M;
      for(int i=0;i<M;i++)
      {
          int x=sc.ni();
          int y=sc.ni();
          if(list[x].contains(y))
          {
              m--;
              continue;
          }
          list[x].add(y);
          list[y].add(x);
      }
      for(int i=1;i<=n;i++)
      {
          int l=list[i].size();
          if(l>0)
          {if(!map.containsKey(l))
          map.put(l,new HashSet());
          map.get(l).add(i);}
      }
      for(int i=1;i<=n;i++)
      {
          int p=list[i].size();
          if(p>=m)
          {
              pw.println("YES");
              return;
          }
          int k=m-p;
          if(true)
          {
              HashSet<Integer> set=map.containsKey(k)?map.get(k):new HashSet();
                int e=set.size();
                if(set.contains(i))
                e--;
                for(int x:list[i])
                {
                    if(list[x].size()==k)
                        e--;
                    else if(list[x].size()>k)
                    {
                        pw.println("YES");
                        return;
                    }
                }
                if(e>0)
                {
                    pw.println("YES");
                    return;
                }
          }
      }
      pw.println("NO");
    }
}   