#include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
//#include <regex>

/* g++ -g -std=c++0x */
/* g++ -g -std=c++11 */

using namespace std;

// std::ios::sync_with_stdio(false);

// freopen("input.txt", "rt", stdin);
// freopen("output.txt", "wt", stdout);

#define ALL(c)          (c).begin(), (c).end()
#define ALLR(c)         (c).rbegin(), (c).rend()
#define FOR(i,a,b)      for (int i=(a); i < (b); ++i)
#define FORR(i,a,b)     for (int i=(a); i > (b); --i)
#define FOR_ALL(i,c)    for (__typeof((c).begin()) i=(c).begin();   \
                             i != (c).end(); ++i)
#define FOR_ALLR(i,c)   for (__typeof((c).rbegin()) i=(c).rbegin(); \
                             i != (c).rend(); ++i)
#define SZ(array)       (sizeof(array)/sizeof(array[0]))
#define lc(x)           (x<<1)     /* 2*x */
#define rc(x)           (x<<1 | 1) /* 2*x+1 */
#define lowbit(x)       (x & (-x)) /* 0b10100 -> 0b100 */

typedef long long       LL;
typedef map<int,int>    MII;
typedef pair<int,int>   PII;
typedef set<int>        SI;
typedef vector<bool>    VB;
typedef vector<double>  VD;
typedef vector<int>     VI;
typedef vector<string>  VS;

/* check if a key is in container C */
template <class C>
inline bool in_(const typename C::key_type& k, const C& A)
{ return A.find(k) != A.end(); }
inline bool in_(const string& s, const string& S)
{ return S.find(s) != string::npos; }

/*
 * If H is a multiple of h and W is a multiple of w, the answer is No.
 * We can divide the entire rectangle into disjoint h*w subrectangles.
 * The sum in each subrectangle must be negative while the sum of the
 * entire rectangle must be positive, which is obviously impossible.
 *
 * Otherwise, we can prove that the solution always exists. Without loss
 * of generality, we can assume that H is not a multiple of h. The
 * following construction works:
 *
 * If the row-number (0-based) of a cell is a multiple of h, write a
 * positive number in the cell.
 *
 * Otherwise, write a negative number in the cell.
 *
 * This way, the ratio of positive numbers in an h*w subrectangle is
 * always 1/h, and the ratio of positive numbers in the entire rectangle
 * is strictly greater than that. Thus, if we properly choose a positive
 * number and a negative number such that the sum in each subrectangle
 * is only slightly smaller than zero, it satisfies the conditions. For
 * example, we can use 1000(h-1)-1 for positive cells and -1000 for
 * negative cells.
 *
 * 0h / + + + + + + \   For h*w, the + ratio is 1/h.
 *    | (-)         |
 *    | (-) /- - -\ |   For H*W, the + ratio is ceil(H/h)/H > 1/h
 *    | (-) | (-) |h|
 * 1h + + + |+ + +| +   There are (h-1) rows of - and 1 row of + in h*w
 *    | (-) \- - -/ |
 *    | (-)         |   Let X = ceil(H/h)
 *    | (-)         |
 * 2h + + + + + + + +   There are X(1000h-1001) +
 *    | (-)         |   There are (H-X)(1000)   -
 *    \ - - - - - - /
 *                      X(1000h-1001) - (H-X)1000 = (Xh-H)1000 - X
 *                      where Xh-H > 1 and X < 500
 */

int main()
{
/* #ifndef ONLINE_JUDGE */
/*     freopen("foo", "rt", stdin); */
/* #endif */
    int H,W,h,w;
    while (cin >> H >> W >> h >> w) {
        if (H%h == 0 && W%w == 0) {
            cout << "No" << endl;
            continue;
        }
        cout << "Yes" << endl;
        const int y = 1000;
        const int x = H%h ? (h-1)*y - 1 : (w-1)*y - 1;
        FOR(i,0,H) FOR(j,0,W) {
            int a;
            if (H%h)
                a = (i%h == 0) ? x : -y;
            else
                a = (j%w == 0) ? x : -y;
            cout << a;
            if (j != W-1)
                cout << ' ';
            else
                cout << endl;
        }
    }
    return 0;
}


Measured memory_bytes: 1664