#pragma warning(disable:4786)
#pragma warning(disable:4996)
#include<list>
#include<bitset>
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<vector>
#include<set>
#include<map>
#include<functional>
#include<string>
#include<cstring>
#include<cstdlib>
#include<queue>
#include<utility>
#include<fstream>
#include<sstream>
#include<cmath>
#include<stack>
#include<assert.h>
using namespace std;

#define MEM(a, b) memset(a, (b), sizeof(a))
#define CLR(a) memset(a, 0, sizeof(a))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define ABS(X) ( (X) > 0 ? (X) : ( -(X) ) )
#define S(X) ( (X) * (X) )
#define SZ(V) (int )V.size()
#define FORN(i, n) for(i = 0; i < n; i++)
#define FORAB(i, a, b) for(i = a; i <= b; i++)
#define ALL(V) V.begin(), V.end()
#define IN(A, B, C)  ((B) <= (A) && (A) <= (C))

typedef pair<int,int> PII;
typedef pair<double, double> PDD;
typedef vector<int> VI;
typedef vector<PII > VP;

#define AIN(A, B, C) assert(IN(A, B, C))

//typedef int LL;
typedef long long int LL;
//typedef __int64 LL;

int board[600][600];
int S[600][600];
int H, W, h, w;
int bktk(int r, int c) {
	if (r == H + 1 && c == 1) {
		if (board[1][1] == 5 && board[1][2] == 5 && board[1][3] == 5 && board[1][4] == 5 && board[1][5] == 5)
			r = r;
		for (int i = 1; i <= H; i++) {
			for (int j = 1; j <= W; j++) {
				S[i][j] = board[i][j] + S[i - 1][j] + S[i][j - 1] - S[i - 1][j - 1];
				if (i >= h && j >= w) {
					int sum = S[i][j] - S[i - h][j] - S[i][j - w] + S[i - h][j - w];
					if (sum >= 0) return 0;
				}
			}
		}
		return S[H][W] > 0;
	}

	if (c == W + 1) {
		return bktk(r + 1, 1);
	}
	for (int i = -5; i <= 5; i++) {
		board[r][c] = i;
		if (bktk(r, c + 1)) 
			return 1;
	}
	return 0;
}

int solve() {
/*	H = rand() % 10 + 1;
	W = rand() % 10 + 1;
	h = rand() % H + 1;
	w = rand() % W + 1;*/
	scanf("%d %d %d %d", &H, &W, &h, &w);
	int sum = 0;
	for (int i = 1; i <= H; i++) {
		for (int j = 1; j <= W; j++) {
			if (i % h == 0 && j % w == 0) {
				board[i][j] = -((h * w - 1) * 1000 + 1);
			}
			else {
				board[i][j] = 1000;
			}
			sum += board[i][j];
		}
	}

	if (sum <= 0) {
//		assert(H % h == 0 || W % w == 0);
		printf("No\n");
		return 0;
	}
	printf("Yes\n");
	for (int i = 1; i <= H; i++) {
		for (int j = 1; j <= W; j++) {
			if (j > 1) printf(" ");
			printf("%d", board[i][j]);
		}
		printf("\n");
	}
/*	for (int i = 1; i <= H; i++) {
		for (int j = 1; j <= W; j++) {
			board[i][j] += board[i - 1][j] + board[i][j - 1] - board[i - 1][j - 1];
			if (i >= h && j >= w) {
				int sum = board[i][j] - board[i - h][j] - board[i][j - w] + board[i - h][j - w];
				assert(sum < 0);
			}
		}
	}*/
	return 1;
}

int main()
{
/*	int ks = 0;
	for (H = 1; H <= 5; H++) for (h = 1; h <= H; h++) for (W = 1; W <= 5; W++) for (w = 1; w <= W; w++)
	//while (1) {
	{
		if (H == 1 && W == 5 && h == 1 && w == 3)
			H = H;
		printf("%d\n", ++ks);
		int a = solve();
		int b = bktk(1, 1);
		if (a != b) {
			printf("%d %d %d %d\n", H, W, h, w);
			for (int i = 1; i <= H; i++) {
				for (int j = 1; j <= W; j++) {
					if (j > 1) printf(" ");
					printf("%d", board[i][j]);
				}
				printf("\n");
			}
		}
		assert(solve() == bktk(1, 1));
	}*/
	solve();

	return 0;
}


Measured memory_bytes: 2816