#include <bits/stdc++.h>   using namespace std;   int main() {     int n, d, m, i, a, b;     cin >> n >> d >> m;     for (i = 0; i < m; i++) {       cin >> a >> b;       if ((a - b + d) * (a - b - d) <= 0 &&           (a + b - d) * (a + b + d - 2 * n) <= 0)         cout <<  YES  << endl;       else         cout <<  NO  << endl;     }     return 0;   }   