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>
using iii = int;
using yeee = iii;
const iii DEBUG = -1;
using namespace std;
using namespace chrono;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using pll = pair<ll, ll>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vpll = vector<pll>;
using point = complex<ld>;
template <template <typename...> class Container, typename T, size_t DIMENSION>
struct MultiDimensional {
  using internal = MultiDimensional<Container, T, DIMENSION - 1>;
  using type = Container<typename internal::type>;
  template <typename... Args>
  static type Generate(T def, const size_t size, Args... sizes) {
    return type(size, internal::Generate(def, sizes...));
  }
};
template <template <typename...> class Container, typename T>
struct MultiDimensional<Container, T, 1> {
  using internal = T;
  using type = Container<T>;
  static type Generate(T def, const size_t size) { return type(size, def); }
};
template <typename T, typename... Args>
auto make_vector(T def, Args... sizes) ->
    typename MultiDimensional<std::vector, T, sizeof...(sizes)>::type {
  return MultiDimensional<std::vector, T, sizeof...(sizes)>::Generate(def,
                                                                      sizes...);
}
template <typename T>
T get() {
  T x;
  cin >> x;
  return x;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &out, const pair<T1, T2> &cont) {
  out << "(" << cont.first << ", " << cont.second << ")";
  return out;
}
template <typename T, typename Alloc>
ostream &operator<<(ostream &out, const vector<T, Alloc> &cont) {
  for (ll i = 0; i < (ll)(cont.size()); ++i) out << (i ? " " : "") << cont[i];
  return out;
}
template <typename T, typename Compare, typename Alloc>
ostream &operator<<(ostream &out, const set<T, Compare, Alloc> &cont) {
  out << "{";
  for (const T &x : cont) out << x << ", ";
  out << "}";
  return out;
}
template <typename T, typename Compare, typename Alloc>
ostream &operator<<(ostream &out, const multiset<T, Compare, Alloc> &cont) {
  out << "{";
  for (const T &x : cont) out << x << ", ";
  out << "}";
  return out;
}
template <typename Key, typename T, typename Compare, typename Alloc>
ostream &operator<<(ostream &out, const map<Key, T, Compare, Alloc> &cont) {
  out << "{";
  for (const pair<Key, T> &x : cont)
    out << "(" << x.first << ": " << x.second << "), ";
  out << "}";
  return out;
}
template <typename T>
ostream &operator<<(ostream &out, vector<vector<T>> &cont) {
  for (vector<T> &v : cont) {
    for (ll i = 0; i < (ll)(v.size()); ++i) {
      out << (i ? " " : "") << v[i];
    }
    out << "\n";
  }
  return out;
}
ld get_time() {
  return ld(duration_cast<nanoseconds>(
                high_resolution_clock::now().time_since_epoch())
                .count()) /
         1e9;
}
ll sign(ld x) { return (x > 0) - (x < 0); }
ll mod(ll x, ll mod) {
  x %= mod;
  if (x < 0) x += mod;
  return x;
}
ll pow(ll x, ll exp, ll mod) {
  ll res = 1, y = x;
  while (exp) {
    if (!mod) {
      if (exp & 1) res = res * y;
      y = y * y;
    } else {
      if (exp & 1) res = (res * y) % mod;
      y = (y * y) % mod;
    }
    exp >>= 1;
  }
  return res;
}
ld START_TIME = get_time();
mt19937_64 rand_mt64(chrono::steady_clock::now().time_since_epoch().count());
mt19937 rand_mt(chrono::steady_clock::now().time_since_epoch().count());
const long long INFll = ll(1.1e18) - 1;
const int INFi = ll(1.1e9) - 1;
ll INF;
char newl = '\n';
void main_init(string input_file = "", string output_file = "",
               bool fast_cio = true) {
  if (fast_cio) {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
  }
  srand(unsigned(time(0)));
  if (DEBUG >= 0 && input_file != "") freopen(input_file.c_str(), "r", stdin);
  if (DEBUG >= 0 && output_file != "")
    freopen(output_file.c_str(), "w", stdout);
  if (sizeof(ll) == sizeof(int)) {
    INF = ll(INFi);
  } else {
    INF = ll(INFll);
  }
}
template <typename T1>
ostringstream &DOUTf(ostringstream &os, ll &names_i, string &names, T1 &&val) {
  while (names[names_i] == ' ') names_i++;
  while (names_i < ll((names).size()) && names[names_i] != ',')
    os << names[names_i++];
  names_i++;
  os << " = " << val;
  return os;
}
template <typename T1, typename... Ts>
ostringstream &DOUTf(ostringstream &os, ll &names_i, string &names, T1 &&val,
                     Ts &&...vals) {
  while (names[names_i] == ' ') names_i++;
  while (names_i < ll((names).size()) && names[names_i] != ',')
    os << names[names_i++];
  names_i++;
  os << " = " << val;
  os << " | ";
  DOUTf(os, names_i, names, vals...);
  return os;
}
bool f(ll x, vpll P, ll n) {
  vll C(n + 1, 0);
  ll c = 0;
  for (pll p : P) {
    if (x == p.first || x == p.second) continue;
    c++;
    C[p.first]++;
    C[p.second]++;
  }
  return !c || *max_element((C).begin(), (C).end()) == c;
}
yeee main() {
  main_init();
  ll N, M;
  cin >> N >> M;
  vpll V(M);
  for (ll i = ll(0); i < ll(M); ++i) cin >> V[i].first >> V[i].second;
  bool res = f(V[0].first, V, N) || f(V[0].second, V, N);
  cout << vector<string>{"NO", "YES"}[res] << endl;
}
