#include <iostream>
#define rep(i, n) for (i = 0; i < n; i++)
#define repn(i, m, n) for(i = m; i < n; i++)
using namespace std;

int n, m, a, b;
char tile[1000][1000];

void put(int r, int c, char p) { tile[r][c] = p; }
void micro_tile(int ly, int ry, int lx, int rx) {
	int i, j;
	repn(i, ly, ry) {
		repn(j, lx, rx) {
			//横におけるなら置く
			if (j + 1 < rx && tile[i][j] == '.' && tile[i][j + 1] == '.' && a > 0) {
				put(i, j, '<'); put(i, j + 1, '>');
				a--;
			}
			//縦におけるなら置く
			if (i + 1 < ry && tile[i][j] == '.' && tile[i + 1][j] == '.' && b > 0) {
				put(i, j, '^'); put(i + 1, j, 'v');
				b--;
			}
		}
	}
}

void tileEE() { int i, j; rep(i, n / 2) rep(j, m / 2) micro_tile(2 * i, 2 * (i + 1), 2 * j, 2 * (j + 1)); }
void tileEO() {
	int i;
	for (i = 0; i < n; i += 2) micro_tile(i, i + 2, m - 1, m);
	tileEE();
}
void tileOE() {
	int j;
	for (j = 0; j < m; j += 2) micro_tile(n - 1, n, j, j + 2);
	tileEE();
}

void tileOO() {
	int i, j;
	
	if (a < 2 || b < 2) {
		tileOE();
		tileEO();
		return;
	}
	if (((m / 2) * n - a) % 2 == 0) {
		for (i = 0; i + 1 < n; i += 2) micro_tile(i, i + 2, m - 1, m);
		for (j = 0; j + 1 < m; j += 2) micro_tile(n - 1, n, j, j + 2);
		
		for (i = 0; i + 1 < n; i += 2)
			for (j = 0; j + 1 < m; j += 2)
				micro_tile(i, i + 2, j, j + 2);
		return;
	}
	
	put(0, 1, '<'); put(0, 2, '>');
	put(2, 0, '<'); put(2, 1, '>');
	put(0, 0, '^');
	put(1, 0, 'v');
	put(1, 2, '^');
	put(2, 2, 'v');
	a -= 2; b -= 2;
	
	for (j = 3; j < m; j += 2) micro_tile(0, 1, j, j + 2);
	for (i = 3; i < n; i += 2) micro_tile(i, i + 2, 0, 1);
	for (j = 3; j < m; j += 2) micro_tile(1, 3, j, j + 2);
	for (i = 3; i < n; i += 2) micro_tile(i, i + 2, 1, 3);
	for (i = 3; i < n; i += 2) for (j = 3; j < m; j += 2) micro_tile(i, i + 2, j, j + 2);
}

int main() {
	cin >> n >> m >> a >> b;
	if (2 * (a + b) > n * m) { cout << "NO" << endl; return 0; }
	if (a > (m / 2) * n) { cout << "NO" << endl; return 0; }
	if (b > (n / 2) * m) { cout << "NO" << endl; return 0; }
	
	int i, j;
	rep(i, n) rep(j, m) tile[i][j] = '.';
	
	if (n % 2 == 0 && m % 2 == 0) {
		if (((a + 1) / 2) * 2 + b > n * m / 2) { cout << "NO" << endl; return 0; }
		tileEE();
	}
	else if (n % 2 == 0 && m % 2 == 1) {
		if (((a + 1) / 2) * 2 + b > n * m / 2) { cout << "NO" << endl; return 0; }
		tileEO();
	}
	else if (n % 2 == 1 && m % 2 == 0) {
		if (((b + 1) / 2) * 2 + a > n * m / 2) { cout << "NO" << endl; return 0; }
		tileOE();
	}
	else {
		tileOO();
	}
	
	cout << "YES" << endl;
	rep(i, n) {
		rep(j, m) {
			cout << tile[i][j];
		}
		cout << endl;
	}
	return 0;
}
### Prompt

Generate a CPP solution to the following problem:

Takahashi has an N \times M grid, with N horizontal rows and M vertical columns. Determine if we can place A 1 \times 2 tiles (1 vertical, 2 horizontal) and B 2 \times 1 tiles (2 vertical, 1 horizontal) satisfying the following conditions, and construct one arrangement of the tiles if it is possible:

* All the tiles must be placed on the grid.
* Tiles must not stick out of the grid, and no two different tiles may intersect.
* Neither the grid nor the tiles may be rotated.
* Every tile completely covers exactly two squares.

Constraints

* 1 \leq N,M \leq 1000
* 0 \leq A,B \leq 500000
* N, M, A and B are integers.

Input

Input is given from Standard Input in the following format:


N M A B


Output

If it is impossible to place all the tiles, print `NO`. Otherwise, print the following:


YES
c_{11}...c_{1M}
:
c_{N1}...c_{NM}


Here, c_{ij} must be one of the following characters: `.`, `<`, `>`, `^` and `v`. Represent an arrangement by using each of these characters as follows:

* When c_{ij} is `.`, it indicates that the square at the i-th row and j-th column is empty;
* When c_{ij} is `<`, it indicates that the square at the i-th row and j-th column is covered by the left half of a 1 \times 2 tile;
* When c_{ij} is `>`, it indicates that the square at the i-th row and j-th column is covered by the right half of a 1 \times 2 tile;
* When c_{ij} is `^`, it indicates that the square at the i-th row and j-th column is covered by the top half of a 2 \times 1 tile;
* When c_{ij} is `v`, it indicates that the square at the i-th row and j-th column is covered by the bottom half of a 2 \times 1 tile.

Examples

Input

3 4 4 2


Output

YES
<><>
^<>^
v<>v


Input

4 5 5 3


Output

YES
<>..^
^.<>v
v<>.^
<><>v


Input

7 9 20 20


Output

NO

### Response

```cpp
#include <iostream>
#define rep(i, n) for (i = 0; i < n; i++)
#define repn(i, m, n) for(i = m; i < n; i++)
using namespace std;

int n, m, a, b;
char tile[1000][1000];

void put(int r, int c, char p) { tile[r][c] = p; }
void micro_tile(int ly, int ry, int lx, int rx) {
	int i, j;
	repn(i, ly, ry) {
		repn(j, lx, rx) {
			//横におけるなら置く
			if (j + 1 < rx && tile[i][j] == '.' && tile[i][j + 1] == '.' && a > 0) {
				put(i, j, '<'); put(i, j + 1, '>');
				a--;
			}
			//縦におけるなら置く
			if (i + 1 < ry && tile[i][j] == '.' && tile[i + 1][j] == '.' && b > 0) {
				put(i, j, '^'); put(i + 1, j, 'v');
				b--;
			}
		}
	}
}

void tileEE() { int i, j; rep(i, n / 2) rep(j, m / 2) micro_tile(2 * i, 2 * (i + 1), 2 * j, 2 * (j + 1)); }
void tileEO() {
	int i;
	for (i = 0; i < n; i += 2) micro_tile(i, i + 2, m - 1, m);
	tileEE();
}
void tileOE() {
	int j;
	for (j = 0; j < m; j += 2) micro_tile(n - 1, n, j, j + 2);
	tileEE();
}

void tileOO() {
	int i, j;
	
	if (a < 2 || b < 2) {
		tileOE();
		tileEO();
		return;
	}
	if (((m / 2) * n - a) % 2 == 0) {
		for (i = 0; i + 1 < n; i += 2) micro_tile(i, i + 2, m - 1, m);
		for (j = 0; j + 1 < m; j += 2) micro_tile(n - 1, n, j, j + 2);
		
		for (i = 0; i + 1 < n; i += 2)
			for (j = 0; j + 1 < m; j += 2)
				micro_tile(i, i + 2, j, j + 2);
		return;
	}
	
	put(0, 1, '<'); put(0, 2, '>');
	put(2, 0, '<'); put(2, 1, '>');
	put(0, 0, '^');
	put(1, 0, 'v');
	put(1, 2, '^');
	put(2, 2, 'v');
	a -= 2; b -= 2;
	
	for (j = 3; j < m; j += 2) micro_tile(0, 1, j, j + 2);
	for (i = 3; i < n; i += 2) micro_tile(i, i + 2, 0, 1);
	for (j = 3; j < m; j += 2) micro_tile(1, 3, j, j + 2);
	for (i = 3; i < n; i += 2) micro_tile(i, i + 2, 1, 3);
	for (i = 3; i < n; i += 2) for (j = 3; j < m; j += 2) micro_tile(i, i + 2, j, j + 2);
}

int main() {
	cin >> n >> m >> a >> b;
	if (2 * (a + b) > n * m) { cout << "NO" << endl; return 0; }
	if (a > (m / 2) * n) { cout << "NO" << endl; return 0; }
	if (b > (n / 2) * m) { cout << "NO" << endl; return 0; }
	
	int i, j;
	rep(i, n) rep(j, m) tile[i][j] = '.';
	
	if (n % 2 == 0 && m % 2 == 0) {
		if (((a + 1) / 2) * 2 + b > n * m / 2) { cout << "NO" << endl; return 0; }
		tileEE();
	}
	else if (n % 2 == 0 && m % 2 == 1) {
		if (((a + 1) / 2) * 2 + b > n * m / 2) { cout << "NO" << endl; return 0; }
		tileEO();
	}
	else if (n % 2 == 1 && m % 2 == 0) {
		if (((b + 1) / 2) * 2 + a > n * m / 2) { cout << "NO" << endl; return 0; }
		tileOE();
	}
	else {
		tileOO();
	}
	
	cout << "YES" << endl;
	rep(i, n) {
		rep(j, m) {
			cout << tile[i][j];
		}
		cout << endl;
	}
	return 0;
}
```