#include "bits/stdc++.h" using namespace std; #define int long long #define ll long long #define rep(i,n) for(ll i = 0; i < (n); i++) #define P pair #define ld long double ll INF = (1LL << 60); int mod = 1000000007; int N, M; signed main() { ios::sync_with_stdio(false); cin.tie(nullptr); cin >> N >> M; int now = 0; int before = 0; rep(i, M) { int t, p; cin >> t >> p; int need = abs(p - now); if (need > t - before) { cout << "No" << endl; return 0; } before = t; now = p; } cout << "Yes" << endl; return 0; }