#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < n; i++)
#define rep2(i, x, n) for(int i = x; i <= n; i++)
#define rep3(i, x, n) for(int i = x; i >= n; i--)
#define elif else if
#define sp(x) fixed << setprecision(x)
#define pb push_back
#define eb emplace_back
#define all(x) x.begin(), x.end()
#define sz(x) (int)x.size()
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pil = pair<int, ll>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
const ll MOD = 1e9+7;
//const ll MOD = 998244353;
const int inf = (1<<30)-1;
const ll INF = (1LL<<60)-1;
const ld EPS = 1e-10;
template<typename T> bool chmax(T &x, const T &y) {return (x < y)? (x = y, true) : false;};
template<typename T> bool chmin(T &x, const T &y) {return (x > y)? (x = y, true) : false;};

int main(){
    int N, M, A, B;
    cin >> N >> M >> A >> B;
    char ans[N][M];
    fill(ans[0], ans[N], '.');
    if(M == 1 && A > 0) {cout << "NO" << endl; return 0;}
    if(N&1){
        rep(i, M/2){
            if(A <= 0) break;
            ans[N-1][2*i] = '<', ans[N-1][2*i+1] = '>';
            A--;
        }
    }
    if(!(A&1) || !(M&1) || !(N&1)){
        rep(i, N/2){
            if(A <= 0) break;
            rep(j, M/2){
                if(A <= 0) break;
                rep(k, 2){
                    if(A <= 0) break;
                    ans[2*i+k][2*j] = '<', ans[2*i+k][2*j+1] = '>';
                    A--;
                }
            }
        }
    }
    else{
        rep(i, N/2){
            if(A <= 1) break;
            rep(j, (M-3)/2){
                if(A <= 1) break;
                rep(k, 2){
                    if(A <= 1) break;
                    ans[2*i+k][2*j] = '<', ans[2*i+k][2*j+1] = '>';
                    A--;
                }
            }
        }
        rep(i, N-1){
            if(A <= 0) break;
            ans[i][M-2] = '<', ans[i][M-1] = '>';
            A--;
        }
    }
    if(A > 0) {cout << "NO" << endl; return 0;}
    rep(j, M){
        if(B <= 0) break;
        rep(i, N){
            if(B <= 0) break;
            if(i+1 < N && ans[i][j] == '.' && ans[i+1][j] == '.'){
                ans[i][j] = '^', ans[i+1][j] = 'v';
                B--;
            }
        }
    }
    if(B > 0) {cout << "NO" << endl; return 0;}
    cout << "YES" << endl;
    rep(i, N){
        rep(j, M) cout << ans[i][j]; cout << endl;
    }
}
### Prompt

Please formulate 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 <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < n; i++)
#define rep2(i, x, n) for(int i = x; i <= n; i++)
#define rep3(i, x, n) for(int i = x; i >= n; i--)
#define elif else if
#define sp(x) fixed << setprecision(x)
#define pb push_back
#define eb emplace_back
#define all(x) x.begin(), x.end()
#define sz(x) (int)x.size()
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pil = pair<int, ll>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
const ll MOD = 1e9+7;
//const ll MOD = 998244353;
const int inf = (1<<30)-1;
const ll INF = (1LL<<60)-1;
const ld EPS = 1e-10;
template<typename T> bool chmax(T &x, const T &y) {return (x < y)? (x = y, true) : false;};
template<typename T> bool chmin(T &x, const T &y) {return (x > y)? (x = y, true) : false;};

int main(){
    int N, M, A, B;
    cin >> N >> M >> A >> B;
    char ans[N][M];
    fill(ans[0], ans[N], '.');
    if(M == 1 && A > 0) {cout << "NO" << endl; return 0;}
    if(N&1){
        rep(i, M/2){
            if(A <= 0) break;
            ans[N-1][2*i] = '<', ans[N-1][2*i+1] = '>';
            A--;
        }
    }
    if(!(A&1) || !(M&1) || !(N&1)){
        rep(i, N/2){
            if(A <= 0) break;
            rep(j, M/2){
                if(A <= 0) break;
                rep(k, 2){
                    if(A <= 0) break;
                    ans[2*i+k][2*j] = '<', ans[2*i+k][2*j+1] = '>';
                    A--;
                }
            }
        }
    }
    else{
        rep(i, N/2){
            if(A <= 1) break;
            rep(j, (M-3)/2){
                if(A <= 1) break;
                rep(k, 2){
                    if(A <= 1) break;
                    ans[2*i+k][2*j] = '<', ans[2*i+k][2*j+1] = '>';
                    A--;
                }
            }
        }
        rep(i, N-1){
            if(A <= 0) break;
            ans[i][M-2] = '<', ans[i][M-1] = '>';
            A--;
        }
    }
    if(A > 0) {cout << "NO" << endl; return 0;}
    rep(j, M){
        if(B <= 0) break;
        rep(i, N){
            if(B <= 0) break;
            if(i+1 < N && ans[i][j] == '.' && ans[i+1][j] == '.'){
                ans[i][j] = '^', ans[i+1][j] = 'v';
                B--;
            }
        }
    }
    if(B > 0) {cout << "NO" << endl; return 0;}
    cout << "YES" << endl;
    rep(i, N){
        rep(j, M) cout << ans[i][j]; cout << endl;
    }
}
```