#include<stdio.h>
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<string.h>
using namespace std;

typedef long long LL;
typedef vector<int> VI;

#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define EACH(i,c) for(__typeof((c).begin()) i=(c).begin(),i##_end=(c).end();i!=i##_end;++i)
#define eprintf(...) fprintf(stderr, __VA_ARGS__)

template<class T> inline void amin(T &x, const T &y) { if (y<x) x=y; }
template<class T> inline void amax(T &x, const T &y) { if (x<y) x=y; }
template<class Iter> void rprintf(const char *fmt, Iter begin, Iter end) {
    for (bool sp=0; begin!=end; ++begin) { if (sp) putchar(' '); else sp = true; printf(fmt, *begin); }
    putchar('\n');
}

char S[1011][1011];
bool F(int n, int m, int a, int b) {
    int g = (a+a%2)/2 + (b+b%2)/2;
    int h = n*m/4;
    if (g <= h) {
	for (int i=0; i<n; i+=2) for (int j=0; j<m; j+=2) {
	    if (a) {
		REP (t, 2) {
		    if (a) {
			S[i+t][j] = '<';
			S[i+t][j+1] = '>';
			a--;
		    }
		}
	    } else if (b) {
		REP (t, 2) {
		    if (b) {
			S[i][j+t] = '^';
			S[i+1][j+t] = 'v';
			b--;
		    }
		}
	    }
	}

	return true;
    } else {
	return false;
    }
}

int N, M;
int A, B;

void MAIN() {
    scanf("%d%d%d%d", &N, &M, &A, &B);
    bool yes;
    memset(S, '.', sizeof S);
    if ((N&1) && (M&1)) {
	int ga = min(A, M/2);
	int gb = min(B, N/2);
	yes = F(N-1, M-1, A-ga, B-gb);
	if (yes) {
	    REP (i, ga) {
		S[N-1][2*i] = '<';
		S[N-1][2*i+1] = '>';
	    }
	    REP (j, gb) {
		S[2*j][M-1] = '^';
		S[2*j+1][M-1] = 'v';
	    }
	} else if (N >= 3 && M >= 3) {
	    int a = A-ga, b = B-gb;
	    if (a && b) {
		a--; b--;
		int g = (a+a%2)/2 + (b+b%2)/2;
		int h = (N-1)*(M-1)/4;
		if (g <= h-1) {
		    yes = true;
		    F(N-1, M-1, A-ga-1, B-gb-1);
		    REP (i, ga-1) {
			S[N-1][2*i] = '<';
			S[N-1][2*i+1] = '>';
		    }
		    REP (j, gb-1) {
			S[2*j][M-1] = '^';
			S[2*j+1][M-1] = 'v';
		    }
		    const char z[4][4] = {
			"^<>",
			"v.^",
			"<>v",
		    };

		    REP (i, 3) REP (j, 3) S[N-3+i][M-3+j] = z[i][j];
		}
	    }
	}
    } else if (N&1) {
	int ga = min(A, M/2);
	yes = F(N-1, M, A-ga, B);
	if (yes) {
	    REP (i, ga) {
		S[N-1][2*i] = '<';
		S[N-1][2*i+1] = '>';
	    }
	}
    } else if (M&1) {
	int gb = min(B, N/2);
	yes = F(N, M-1, A, B-gb);
	if (yes) {
	    REP (j, gb) {
		S[2*j][M-1] = '^';
		S[2*j+1][M-1] = 'v';
	    }
	}
    } else {
	yes = F(N, M, A, B);
    }

    if (yes) {
	puts("YES");
	REP (i, N) {
	    S[i][M] = 0;
	    puts(S[i]);
	}
    } else {
	puts("NO");
    }
}

int main() {
    int TC = 1;
//    scanf("%d", &TC);
    REP (tc, TC) MAIN();
    return 0;
}


### Prompt

Please create a solution in Cpp 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<stdio.h>
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<string.h>
using namespace std;

typedef long long LL;
typedef vector<int> VI;

#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define EACH(i,c) for(__typeof((c).begin()) i=(c).begin(),i##_end=(c).end();i!=i##_end;++i)
#define eprintf(...) fprintf(stderr, __VA_ARGS__)

template<class T> inline void amin(T &x, const T &y) { if (y<x) x=y; }
template<class T> inline void amax(T &x, const T &y) { if (x<y) x=y; }
template<class Iter> void rprintf(const char *fmt, Iter begin, Iter end) {
    for (bool sp=0; begin!=end; ++begin) { if (sp) putchar(' '); else sp = true; printf(fmt, *begin); }
    putchar('\n');
}

char S[1011][1011];
bool F(int n, int m, int a, int b) {
    int g = (a+a%2)/2 + (b+b%2)/2;
    int h = n*m/4;
    if (g <= h) {
	for (int i=0; i<n; i+=2) for (int j=0; j<m; j+=2) {
	    if (a) {
		REP (t, 2) {
		    if (a) {
			S[i+t][j] = '<';
			S[i+t][j+1] = '>';
			a--;
		    }
		}
	    } else if (b) {
		REP (t, 2) {
		    if (b) {
			S[i][j+t] = '^';
			S[i+1][j+t] = 'v';
			b--;
		    }
		}
	    }
	}

	return true;
    } else {
	return false;
    }
}

int N, M;
int A, B;

void MAIN() {
    scanf("%d%d%d%d", &N, &M, &A, &B);
    bool yes;
    memset(S, '.', sizeof S);
    if ((N&1) && (M&1)) {
	int ga = min(A, M/2);
	int gb = min(B, N/2);
	yes = F(N-1, M-1, A-ga, B-gb);
	if (yes) {
	    REP (i, ga) {
		S[N-1][2*i] = '<';
		S[N-1][2*i+1] = '>';
	    }
	    REP (j, gb) {
		S[2*j][M-1] = '^';
		S[2*j+1][M-1] = 'v';
	    }
	} else if (N >= 3 && M >= 3) {
	    int a = A-ga, b = B-gb;
	    if (a && b) {
		a--; b--;
		int g = (a+a%2)/2 + (b+b%2)/2;
		int h = (N-1)*(M-1)/4;
		if (g <= h-1) {
		    yes = true;
		    F(N-1, M-1, A-ga-1, B-gb-1);
		    REP (i, ga-1) {
			S[N-1][2*i] = '<';
			S[N-1][2*i+1] = '>';
		    }
		    REP (j, gb-1) {
			S[2*j][M-1] = '^';
			S[2*j+1][M-1] = 'v';
		    }
		    const char z[4][4] = {
			"^<>",
			"v.^",
			"<>v",
		    };

		    REP (i, 3) REP (j, 3) S[N-3+i][M-3+j] = z[i][j];
		}
	    }
	}
    } else if (N&1) {
	int ga = min(A, M/2);
	yes = F(N-1, M, A-ga, B);
	if (yes) {
	    REP (i, ga) {
		S[N-1][2*i] = '<';
		S[N-1][2*i+1] = '>';
	    }
	}
    } else if (M&1) {
	int gb = min(B, N/2);
	yes = F(N, M-1, A, B-gb);
	if (yes) {
	    REP (j, gb) {
		S[2*j][M-1] = '^';
		S[2*j+1][M-1] = 'v';
	    }
	}
    } else {
	yes = F(N, M, A, B);
    }

    if (yes) {
	puts("YES");
	REP (i, N) {
	    S[i][M] = 0;
	    puts(S[i]);
	}
    } else {
	puts("NO");
    }
}

int main() {
    int TC = 1;
//    scanf("%d", &TC);
    REP (tc, TC) MAIN();
    return 0;
}


```