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.
#include <bits/stdc++.h>
namespace myland {
using namespace std;
namespace _abbr {}
using namespace _abbr;
namespace _constant {
const double EPS(1e-8);
const double PI(acos(-1.0));
const int INF(0x3f3f3f3f);
const long long INFL(0x3f3f3f3f3f3f3f3fll);
const int MOD(1e9 + 7);
const int dx[] = {-1, 0, 1, 0, -1, 1, 1, -1},
          dy[] = {0, 1, 0, -1, 1, 1, -1, -1};
}  // namespace _constant
using namespace _constant;
namespace _solve {}
using namespace _solve;
namespace _calculate {
bool odd(long long x) { return x & 1; }
bool even(long long x) { return (x & 1) ^ 1; }
bool posi(long long x) { return x > 0; }
bool nega(long long x) { return x < 0; }
bool zero(long long x) { return x == 0; }
bool prime(long long x) {
  if (x < 2) return 0;
  for (int i = 2; i * i <= x; i++)
    if (x % i == 0) return 0;
  return 1;
}
long long droot(long long x) { return 1 + (x - 1) % 9; }
long long upd(long long a, long long b) { return a % b ? a / b + 1 : a / b; };
long long random(long long a, long long b) {
  return a + rand() * rand() % (b - a + 1);
};
long long bitn(long long x) {
  long long c = 0;
  while (x) c++, x >>= 1;
  return c;
}
template <class T>
T sqr(T x) {
  return x * x;
}
long long qpow(long long a, long long n, long long mod = MOD) {
  long long res(1);
  while (n) {
    if (n & 1) (res *= a) %= mod;
    (a *= a) %= mod;
    n >>= 1;
  }
  return res % mod;
}
long long inv(long long a, long long mod = MOD) { return qpow(a, mod - 2); }
template <class T>
void tomin(T& a, T b) {
  if (b < a) a = b;
}
template <class T>
void tomax(T& a, T b) {
  if (b > a) a = b;
}
}  // namespace _calculate
using namespace _calculate;
namespace _simple_algo {
long long sol(const string& s) {
  long long x = 0;
  for (char c : s) x = x * 10 + c - 48;
  return x;
}
string los(long long x) {
  string s = "";
  if (x == 0) return "0";
  while (x) s = char(x % 10 + 48) + s, x /= 10;
  return s;
}
bool pal(const string& s) {
  int l = s.size();
  for (int i = 0, j = l - 1; i < j; i++, j--)
    if (s[i] != s[j]) return 0;
  return 1;
}
}  // namespace _simple_algo
using namespace _simple_algo;
namespace _io {
template <class T>
void rd(T& x) {
  cin >> x;
}
string srd() {
  string s;
  cin >> s;
  return s;
}
long long rd() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
void rd(int& x) { x = rd(); }
void rd(long long& x) { x = rd(); }
template <class A, class B>
void rd(pair<A, B>& p) {
  cin >> p.first >> p.second;
}
template <class A, class B>
void rd(A& a, B& b) {
  rd(a), rd(b);
}
template <class A, class B, class C>
void rd(A& a, B& b, C& c) {
  rd(a, b);
  rd(c);
}
template <class T>
void wt(const T& x) {
  cout << x << endl;
}
template <class T>
void wt(const T& x, char c) {
  cout << x << c;
}
template <class T>
void wt(const T& x, const string& s) {
  cout << x << s;
}
template <class T>
void wt(const T& x, int rnd) {
  cout << fixed << setprecision(rnd) << x << endl;
}
template <class T>
void wt(const vector<T>& v) {
  for (T x : v) wt(x, ' ');
  wt("");
}
template <class A, class B>
void wt(const pair<A, B>& make_pair) {
  cout << make_pair.first << ' ' << make_pair.second << endl;
}
}  // namespace _io
using namespace _io;
}  // namespace myland
using namespace myland;
const int N = 3e5 + 5;
int n, m;
vector<pair<int, int> > a;
int cnt[N];
bool ok(int x) {
  for (auto& e : a)
    if (e.first != x && e.second != x) return 0;
  return 1;
}
bool ck() {
  int num = 0;
  for (auto& e : a) {
    if (e.first == a[0].first || e.second == a[0].first) continue;
    ;
    num++;
    cnt[e.first]++;
    cnt[e.second]++;
  }
  if (*max_element((cnt + 1), (cnt + n + 1)) == num) return 1;
  memset(cnt, 0, sizeof(cnt));
  num = 0;
  for (auto& e : a) {
    if (e.first == a[0].second || e.second == a[0].second) continue;
    ;
    num++;
    cnt[e.first]++;
    cnt[e.second]++;
  }
  if (*max_element((cnt + 1), (cnt + n + 1)) == num) return 1;
  return 0;
}
int main() {
  rd(n, m);
  for (int cas = 1, tms = (m); cas <= tms; cas++) a.push_back({rd(), rd()});
  if (ok(a[0].first) || ok(a[0].second)) wt("YES"), exit(0);
  if (ck()) wt("YES"), exit(0);
  wt("NO"), exit(0);
}
