#include <bits/stdc++.h>   using namespace std;   int n, d;   int main() {     cin >> n >> d;     int m;     cin >> m;     for (int i = 1; i <= m; i++) {       int x, y;       cin >> x >> y;       puts((d <= x + y && x + y <= 2 * n - d && -d <= x - y && x - y <= d)                ?  YES                 :  NO );     }   }   