/* -*- coding: utf-8 -*- * * 1205.cc: No.1205 Eye Drops - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ const int MAX_M = 100000; /* typedef */ typedef long long ll; /* global variables */ /* subroutines */ /* main */ int main() { int n, m; scanf("%d%d", &n, &m); ll t = 0; int p = 0; for (int i = 0; i < m; i++) { ll ti; int pi; scanf("%lld%d", &ti, &pi); if (ti - t < abs(p - pi)) { puts("No"); return 0; } t = ti, p = pi; } puts("Yes"); return 0; }