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 namespace std;
bool isPrime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
vector<long long> primes;
bool prime[10005];
void seive() {
  memset(prime, 1, sizeof(prime));
  prime[0] = 0;
  prime[1] = 0;
  for (long long i = 2; i <= 10000; i++) {
    if (prime[i] == 1) {
      for (long long j = i * i; j <= 10000; j += i) prime[j] = 0;
    }
  }
}
long long power(long long a, long long b) {
  long long ans = 1;
  while (b > 0) {
    if (b % 2 == 1) ans = (ans % 1000000007 * a % 1000000007) % 1000000007;
    a = (a * a) % 1000000007;
    b = b / 2;
  }
  return ans;
}
template <typename T>
std::string NumberToString(T Number) {
  std::ostringstream ss;
  ss << Number;
  return ss.str();
}
string no_to_bits(long long n) {
  string temp = "";
  while (n) {
    temp += (n % 2) + '0';
    n /= 2;
  }
  reverse(temp.begin(), temp.end());
  return temp;
}
long long bits_to_no(string s) {
  long long ans = 0, var = 0;
  for (int i = s.size() - 1; i >= 0; i--) {
    ans += pow(2, var++) * (s[i] - '0');
  }
  return ans;
}
void solve() {
  long long n, m;
  cin >> n >> m;
  vector<pair<long long, long long> > v(m);
  long long i, j, k;
  for (i = 0; i < m; i++) {
    cin >> v[i].first >> v[i].second;
  }
  long long one = v[0].first, ct1 = 0, arr[n + 1];
  for (i = 0; i < n + 1; i++) arr[i] = 0;
  for (i = 1; i < m; i++) {
    if (v[i].first != one && v[i].second != one) {
      arr[v[i].first]++;
      arr[v[i].second]++;
      ct1++;
    }
  }
  long long maxi1 = 0;
  for (i = 1; i <= n; i++) {
    if (arr[i] > maxi1) maxi1 = arr[i];
  }
  if (maxi1 == ct1) {
    cout << "YES";
    return;
  }
  long long two = v[0].second, ct2 = 0, arr1[n + 1];
  for (i = 0; i < n + 1; i++) arr1[i] = 0;
  for (i = 1; i < m; i++) {
    if (v[i].first != two && v[i].second != two) {
      arr1[v[i].first]++;
      arr1[v[i].second]++;
      ct2++;
    }
  }
  long long maxi2 = 0;
  for (i = 1; i <= n; i++) {
    if (arr1[i] > maxi2) maxi2 = arr1[i];
  }
  if (maxi2 == ct2) {
    cout << "YES";
    return;
  }
  cout << "NO";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  bool codechef = 0;
  long long t = 1;
  if (codechef) cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
