#include <cstdio>
#include <vector>
using namespace std;
typedef unsigned int ui32_t;
struct PointT{
    ui32_t X, Y;
};
vector<PointT> Shits[1024][1024];
bool ShitsOn[1024][1024], SectorW, SectorH;
bool TentOnShit(PointT Tent, size_t S){
    ui32_t i;
    PointT FirstSector, LastSector, Curr, Shit;
    FirstSector.X=Tent.X/SectorW;
    FirstSector.Y=Tent.Y/SectorH;
    LastSector.X=(Tent.X+S)/SectorW;
    LastSector.Y=(Tent.Y+S)/SectorH;
    for(Curr.X=FirstSector.X;Curr.X<=LastSector.X;Curr.X++){
        for(Curr.Y=FirstSector.Y;Curr.Y<=LastSector.Y;Curr.Y++){
            if(Curr.X!=FirstSector.X&&Curr.X!=LastSector.X&&Curr.Y!=FirstSector.Y&&Curr.Y!=LastSector.Y){
                if(ShitsOn[Curr.X][Curr.Y]) return 1;
            }else{
                for(i=0;i<Shits[Curr.X][Curr.Y].size();i++){
                    Shit=Shits[Curr.X][Curr.Y][i];
                    if(Shit.X>Curr.X&&Shit.Y>Curr.Y&&Shit.X<Curr.X+S&&Shit.Y<Curr.Y+S) return 1;
                }
            }
        }
    }
    return 0;
}
ui32_t W, H, S, N, i;
PointT Tent, Shit;
int main(){
    scanf("%u %u %u", &W, &H, &S);
    SectorW=(W+1023)/1024;
    SectorH=(H+1023)/1024;
    scanf("%u", &N);
    for(i=0;i<N;i++){
        scanf("%u %u", &Shit.X, &Shit.Y);
        Shits[Shit.X/SectorW][Shit.Y/SectorH].push_back(Shit);
        ShitsOn[Shit.X/SectorW][Shit.Y/SectorH]=1;
    }
    for(Tent.X=0;Tent.X+S<=W;Tent.X++){
        for(Tent.Y=0;Tent.Y+S<=H;Tent.Y++){
            if(!TentOnShit(Tent, S)){
                printf("YES\n");
                return 0;
            }
        }
    }
    printf("NO\n");
    return 0;
}
