# include <cstdio>
# include <cstring>
using namespace std;
int n, m, hx, hy;
long long a[50][50];
int main(){
scanf("%d %d %d %d", &n, &m, &hx, &hy);
for(int i = 0; i <= n; i++)
{
for(int j = 0; j <= m; j++) a[i][j] = 1;
}
a[hx][hy] = 0;
if(hy - 1 >= 0) a[hx + 2][hy - 1] = 0;
a[hx + 2][hy + 1] = 0;
if(hx - 1 >= 0 && hy - 2 >= 0) a[hx - 1][hy - 2] = 0;
if(hx - 1 >= 0) a[hx - 1][hy + 2] = 0;
if(hy - 2 >= 0) a[hx + 1][hy - 2] = 0;
a[hx + 1][hy + 2] = 0;
if(hx - 2 >= 0 && hy - 1 >= 0) a[hx - 2][hy - 1] = 0;
if(hx - 2 >= 0) a[hx - 2][hy + 1] = 0;
for(int i = 1; i <= n; i++)
{
for(int j = 1; j <= m; j++)
{
if(a[i][j] == 0) continue;
a[i][j] = a[i - 1][j] + a[i][j - 1];
printf("%d %d %d\n", i, j, a[i][j]);
}
}
printf("%ld", a[n][m]);
return 0;
}