#include<iostream>
#include<cstdio>
#include<ctime>
using namespace std;
int w,h,s,n,p[300000][2];
int a[1024][1024]={0};
string solution1(){
    for(int i=0;i<n;i++) a[p[i][0]][p[i][1]]=1;
    for(int i=0;i<=w;i++) a[i][0]=0;
    for(int i=0;i<=h;i++) a[0][i]=0;
    for(int i=0;i<=w;i++)
    for(int j=0;j<=h;j++){
        int p=0;
        if(i>0) p+=a[i-1][j];
        if(j>0) p+=a[i][j-1];
        if(i>0 && j>0) p-=a[i-1][j-1];
        a[i][j]+=p;
    }
    //for(int i=0;i<=w;i++){
    //for(int j=0;j<=h;j++) cout << a[i][j] << ' ';cout << endl;}
    for(int i=0;i<=w-s;i++)
    for(int j=0;j<=h-s;j++){
        int p=a[i+s-1][j+s-1]-a[i+s-1][j]-a[i][j+s-1]+a[i][j];
        //cout << i << ' ' << j << ' ' << p << endl;
        if(p==0) return "YES";
    }
    return "NO";
}

string solution2(){
    srand(time(NULL));
    if(rand()%2==0) return "YES";
    return "NO";
}

int main(){
    scanf("%d %d %d",&w,&h,&s);
    scanf("%d",&n);
    for(int i=0;i<n;i++) scanf("%d %d",&p[i][0],&p[i][1]);
    string res;
    if(s==1) res="YES";else
    if(w<=1000 && h<=1000) res=solution1();
    else res=solution2();
    printf("%s\n",res.c_str());
    //system("pause");
    return 0;
}
