#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <cmath>
#include <array>
#include <string>
#include <cstdio>
#include <iterator>
#include <unordered_set>
#include <cstdint>
#include <queue>
#include <stack>
#include <deque>
#include <numeric>
#include <fstream>
using namespace std;
template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p) { return os << '(' << p.first << ", " << p.second << ')'; }
template<typename T_container, typename T = typename enable_if<!is_same<T_container, string>::value, typename T_container::value_type>::type> ostream& operator<<(ostream &os, const T_container &v) { os << '{'; string sep; for (const T &x : v) os << sep << x, sep = ", "; return os << '}'; }
void dbg_out() { cout << endl; }
template<typename Head, typename... Tail> void dbg_out(Head H, Tail... T) { cout << ' ' << H; dbg_out(T...); }
#ifdef LOCAL
#define dbg(...) cout << "(" << #__VA_ARGS__ << "):", dbg_out(__VA_ARGS__)
#else
#define dbg(...)
#endif
/*
notes:
int64_t
stoi(string s) -> string to int
to_string() -> int (or else) to string
vector declaration:
vector<ll> v(n, 0)
vector<vector<ll>> v(n, vector<ll>(n, 0));
{if statement} ? {truth value} : {false value}
set lower bound/upper bound:
// . . . m1 . . . d . . . . m2
auto m1_it = b.lower_bound(d);
advance(m1_it, -1);
m1 = *m1_it;
m2 = *b.upper_bound(d);
#ifdef LOCAL
freopen("in.txt","r",stdin);
freopen("out.txt","w",stdout);
#endif
constexpr auto lcm(auto x, auto... xs)
{
return ((x = std::lcm(x, xs)), ...);
}
std::gcd(int a, int b)
*/
typedef long long ll;
void solve() {
ll n, m, l, k;
cin >> n >> m >> l >> k;
if(k == 0) {
cout << "YES\n";
for(ll i = 0; i < n; i++) {
for(ll j = 0; j < m; j++) {
cout << "R";
}
cout << "\n";
}
return;
}
if(l % 3 != 0) {
cout << "NO";
return;
}
ll nmax = n - l + 1;
ll mmax = m - l + 1;
//cerr << "\nnmax=" << nmax;
//cerr << "\nmmax=" << mmax;
ll lmax = nmax * mmax;
if(lmax < k) {
cout << "NO";
return;
}
string f;
for(ll i = 0; i < m; i++) {
f += 'F';
}
vector<string> v(n, f);
if(m >= n) {
ll rem = k;
map<char, ll> mp;
for(ll i = 0; i < n; i++) {
//cerr << "\ni=" << i;
mp['R'] = rem;
mp['G'] = rem;
mp['B'] = rem;
for(ll j = 0; j < mmax; j++) {
//cerr << "\nj=" << j;
//cerr << "\nv=" << v;
//cerr << "\nmp=" << mp;
char filletter = 'F';
if(i % 3 == 0) {
filletter = 'R';
}else if(i % 3 == 1) {
filletter = 'G';
}else{
filletter = 'B';
}
v[i][j] = filletter;
mp[filletter]--;
if(i >= l - 1) {
rem--;
}
if(j == mmax - 1 || mp[filletter] == 0 || rem == 0) {
for(ll fin = j; fin < j + l; fin++) {
v[i][fin] = filletter;
}
break;
}
if(rem == 0) {
break;
}
}
if(mp['R'] == 0 && mp['G'] == 0 && mp['B'] == 0 || rem == 0) {
break;
}
}
for(ll i = 0; i < n; i++) {
for(ll j = 0; j < m; j++) {
if(v[i][j] == 'F') {
if(i == 0) {
v[i][j] = 'B';
}else{
v[i][j] = v[i-1][j];
}
}
}
}
}else{
ll rem = k;
map<char, ll> mp;
for(ll j = 0; j < m; j++) {
//cerr << "\ni=" << i;
mp['R'] = rem;
mp['G'] = rem;
mp['B'] = rem;
for(ll i = 0; i < nmax; i++) {
//cerr << "\nj=" << j;
//cerr << "\nv=" << v;
//cerr << "\nmp=" << mp;
char filletter = 'F';
if(j % 3 == 0) {
filletter = 'R';
}else if(j % 3 == 1) {
filletter = 'G';
}else{
filletter = 'B';
}
v[i][j] = filletter;
mp[filletter]--;
if(j >= l - 1) {
rem--;
}
if(i == nmax - 1 || mp[filletter] == 0 || rem == 0) {
for(ll fin = i; fin < i + l; fin++) {
v[fin][j] = filletter;
}
break;
}
if(rem == 0) {
break;
}
}
if(mp['R'] == 0 && mp['G'] == 0 && mp['B'] == 0 || rem == 0) {
break;
}
}
for(ll i = 0; i < n; i++) {
for(ll j = 0; j < m; j++) {
if(v[i][j] == 'F') {
if(j == 0) {
v[i][j] = 'B';
}else{
v[i][j] = v[i][j-1];
}
}
}
}
}
cout << "YES\n";
for(const auto & s : v) {
cout << s << "\n";
}
}
int main()
{
std::ios_base::sync_with_stdio(false);
solve();
return 0;
}