#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,m,x,y,sta[30][30]={0};
long long res[30][30]={0};
cin>>n>>m>>x>>y;
n+=2;m+=2;x+=2;y+=2;
sta[x][y]=-1;
sta[x-2][y-1]=-1;
sta[x-2][y+1]=-1;
sta[x+2][y-1]=-1;
sta[x+2][y+1]=-1;
sta[x-1][y-2]=-1;
sta[x-1][y+2]=-1;
sta[x+1][y-2]=-1;
sta[x+1][y+2]=-1;
for(int i=2;i<=n;i++)
{
if(sta[i][2]==-1)
break;
else res[i][2]=1;
}
for(int i=2;i<=n;i++)
{
if(sta[2][i]==-1)
break;
else res[2][i]=1;
}
for(int i=2;i<=n;i++)
{
for(int j=2;j<=m;j++)
cout<<res[i][j]<<' ';
cout<<'\n';
}
for(int i=2;i<=n;i++)
{
for(int j=2;j<=m;j++)
cout<<sta[i][j]<<' ';
cout<<'\n';
}
for(int i=3;i<=n;i++)
{
for(int j=3;j<=m;j++)
if(sta[i][j]!=-1)
res[i][j]=res[i-1][j]+res[i][j-1];
}
cout<<res[n][m];
return 0;
}