#include using namespace std; int main() { int n, m; cin >> n >> m; int now = 0, place = 0; bool c = 1; for(int i = 0; i < m; ++i) { int t, p; cin >> t >> p; if(max(t - now, now - t) < max(p - place, place - p)) { c = 0; break; } now = t; place = p; } if (c) { cout << "Yes" << endl; } else { cout << "No" << endl; } }