#include <bits/stdc++.h>
using namespace std;

template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> struct P {
  T x;
  T y;
  P(T x, T y): x(x), y(y) {}
};
const int DX[4] = {1, 0, -1, 0};
const int DY[4] = {0, 1, 0, -1};
#define int long long
#define rep(i, n) for (int i = 0; i < (n); i++)
constexpr long long INF = 1000000000000000000LL + 8;

signed main() {
  int N, M;
  cin >> N >> M;
  vector<int> A(M);
  rep(i, M) cin >> A[i];
  sort(A.begin(), A.end());
  A.push_back(N + 1);

  // 最小の連続白を探してスタンプにする
  // スタンプを押す配列も作っていく
  int len = INF;
  vector<int> s;
  int current = 0; 
  rep(i, M + 1) {
    int l = A[i] - current;
    if (l > 1) {
      chmin(len, l - 1);
      s.push_back(l - 1);
    }
    current = A[i];
  }

  // スタンプを足していく
  int result = 0;
  rep(i, s.size()) {
    result += (s[i] + len - 1) / len;
  }

  cout << result << endl;
  return 0;
}
#include <bits/stdc++.h>

#define EOL "\n";
typedef long long ll;

using namespace std;

int main(){
    int N, W;
    cin >> N >> W;
    vector<pair<int, int>> event;
    int s, t, p;
    for (int i = 0; i < N; ++i) {
        cin >> s >> t >> p;
        event.push_back(make_pair(s, p));
        event.push_back(make_pair(t, -p));
    }

    sort(event.begin(), event.end());
    long long crr = 0;
    for (auto x : event) {
        crr += x.second;
        if (crr > W) {
            cout << "No";
            return 0;
        }

    }

    cout << "Yes";

    return 0;
}
