#include #define rep(i, ss, ee) for (int i = ss; i < ee; ++i) using namespace std; void solve() { int N, M, ta = 0, pa = 0, tb, pb; cin >> N >> M; rep(i, 0, M) { cin >> tb >> pb; if (abs(pb - pa) > (tb - ta)) { cout << "No" << endl; return; } ta = tb; pa = pb; } cout << "Yes" << endl; } int main() { ios::sync_with_stdio(false); cin.tie(0); solve(); getchar(); }