#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
typedef unsigned int ui32_t;
struct PointT{
    ui32_t X, Y;
};
bool XLess(const PointT &a, const PointT &b){
    return a.X<b.X;
}
bool YLess(const PointT &a, const PointT &b){
    return a.Y<b.Y;
}
vector<PointT> Shits[16][16][2];
bool ShitsOn[16][16], SectorW, SectorH;
bool TentOnShit(PointT Tent, size_t S){
    ui32_t i;
    PointT FirstSector, LastSector, Curr, Shit, TentLower;
    FirstSector.X=Tent.X/SectorW;
    FirstSector.Y=Tent.Y/SectorH;
    LastSector.X=(Tent.X+S)/SectorW;
    LastSector.Y=(Tent.Y+S)/SectorH;
    TentLower.X=Tent.X+S;
    TentLower.Y=Tent.Y+S;
    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 if(Curr.X!=FirstSector.X&&Curr.X!=LastSector.X){
                vector<PointT>::iterator a, b;
                a=upper_bound(Shits[Curr.X][Curr.Y][0].begin(), Shits[Curr.X][Curr.Y][0].end(), Tent, XLess);
                b=lower_bound(Shits[Curr.X][Curr.Y][0].begin(), Shits[Curr.X][Curr.Y][0].end(), TentLower, XLess);
                for(;a<b;a++){
                    if(a->X>Tent.X&&a->X<TentLower.X&&a->Y>Tent.Y&&a->Y<TentLower.Y) return 1;
                }
            }else{
                vector<PointT>::iterator a, b;
                a=upper_bound(Shits[Curr.X][Curr.Y][1].begin(), Shits[Curr.X][Curr.Y][1].end(), Tent, YLess);
                b=lower_bound(Shits[Curr.X][Curr.Y][1].begin(), Shits[Curr.X][Curr.Y][1].end(), TentLower, YLess);
                for(;a<b;a++){
                    if(a->X>Tent.X&&a->X<TentLower.X&&a->Y>Tent.Y&&a->Y<TentLower.Y) return 1;
                }
            }
        }
    }
    return 0;
}
ui32_t W, H, S, N, i, j;
PointT Tent, Shit;
int main(){
    scanf("%u %u %u", &W, &H, &S);
    SectorW=(W+15)/16;
    SectorH=(H+15)/16;
    scanf("%u", &N);
    for(i=0;i<N;i++){
        scanf("%u %u", &Shit.X, &Shit.Y);
        Shits[Shit.X/SectorW][Shit.Y/SectorH][0].push_back(Shit);
        Shits[Shit.X/SectorW][Shit.Y/SectorH][1].push_back(Shit);
        ShitsOn[Shit.X/SectorW][Shit.Y/SectorH]=1;
    }
    if(S==1){
        printf("YES\n");
        return 0;
    }else if(S==2){
        if((W+1)*(H+1)!=N){
            printf("YES\n");
            return 0;
        }else{
            printf("NO\n");
            return 0;
        }
    }

    for(i=0;i<16;i++){
        for(j=0;j<16;j++){
            sort(Shits[i][j][0].begin(), Shits[i][j][0].end(), XLess);
            sort(Shits[i][j][1].begin(), Shits[i][j][1].end(), YLess);
        }
    }
    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;
}
