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;
const long long mod = 7 + 1e9;
const long long N = 400004;
bool prime[N];
const long long H = 10;
void isprime() {
  memset(prime, true, N);
  for (long long i = 2; i * i < N; i++) {
    if (prime[i] == true) {
      for (long long j = i * i; j < N; j += i) {
        prime[j] = false;
      }
    }
  }
}
long long power(long long a, long long n) {
  long long ans = 1;
  a = a % mod;
  while (n > 0) {
    if (n & 1) {
      ans = (ans * a) % mod;
    }
    n = n >> 1;
    a = (a * a) % mod;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, m;
  cin >> n >> m;
  vector<pair<long long, long long> > p;
  for (long long i = 0; i < m; i++) {
    long long x, y;
    cin >> x >> y;
    p.push_back(make_pair(x, y));
  }
  long long i;
  set<long long> d;
  for (i = 0; i < m; i++) {
    if (p[i].first != p[i].second) {
      break;
    } else {
      d.insert(p[i].first);
    }
  }
  if (i == m && d.size() != 2) {
    cout << "NO";
    return 0;
  } else if (i == m && d.size() == 2) {
    cout << "YES";
    return 0;
  }
  long long g = p[i].first;
  long long j;
  for (j = 0; j < m; j++) {
    if (p[j].first != g && p[j].second != g) {
      break;
    }
  }
  long long s = p[j].first;
  long long flag1 = 0;
  for (long long k = j; k < m; k++) {
    if (p[k].first != s && p[k].second != s && p[k].first != g &&
        p[k].second != g) {
      flag1 = 1;
      break;
    }
  }
  s = p[j].second;
  long long flag2 = 0;
  for (long long h = j; h < m; h++) {
    if (p[h].first != s && p[h].second != s && p[h].first != g &&
        p[h].second != g) {
      flag2 = 1;
      break;
    }
  }
  g = p[i].second;
  for (j = 0; j < m; j++) {
    if (p[j].first != g && p[j].second != g) {
      break;
    }
  }
  s = p[j].first;
  long long flag3 = 0;
  for (long long k = j; k < m; k++) {
    if (p[k].first != s && p[k].second != s && p[k].first != g &&
        p[k].second != g) {
      flag3 = 1;
      break;
    }
  }
  s = p[j].second;
  long long flag4 = 0;
  for (long long h = j; h < m; h++) {
    if (p[h].first != s && p[h].second != s && p[h].first != g &&
        p[h].second != g) {
      flag4 = 1;
      break;
    }
  }
  if ((flag1 == 0 || flag2 == 0) || (flag3 == 0 || flag4 == 0)) {
    cout << "YES";
  } else {
    cout << "NO";
  }
  return 0;
}
