#include <bits/stdc++.h>   int main() {     int n, d, t, x, y, z, m;     scanf( %d %d %d , &n, &d, &m);     z = n - d;     while (m--) {       scanf( %d %d , &x, &y);       if (x > n || y > n) {         printf( NO n );       } else {         if (y >= abs(x - d) && y <= n - (abs(z - x))) {           printf( YES n );         } else {           printf( NO n );         }       }     }     return 0;   }   