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