#include #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; typedef long long ll; int main() { int N, M; cin >> N >> M; vector> TP(M); rep(i, M) { cin >> TP[i].first >> TP[i].second; } ll t = 0, p = 0; rep(i, M) { if (abs(TP[i].second - p) > TP[i].first - t) { cout << "No\n"; return 0; } t = TP[i].first; p = TP[i].second; } cout << "Yes\n"; }