Robots#521

Robots

1 second
256 megabytes
Hard

... How much time till sky net takes over humanity? ...

There is a field that can be represented as a grid with rows and columns. Each cell has a direction: right (R), down (D), left (L), or up (U).

There are some restrictions on the directions of the cells:

  1. A cell cannot point outside of the grid;

  2. Every cell has exactly one cell that points to it.

From any cell, we can repeatedly follow directions and obtain a walk: (r_1,c_1),(r_2,c_2),\ldots, where for every i\ge 1 the cell (r_i,c_i) points to (r_{i+1},c_{i+1}).

A walk (r_1,c_1),(r_2,c_2),\ldots,(r_k,c_k) is called enclosed if:

  1. k \ge 2;

  2. (r_1,c_1)=(r_k,c_k);

  3. All cells (r_1,c_1),(r_2,c_2),\ldots,(r_{k-1},c_{k-1}) are pairwise distinct.

A grid is called beautiful if the cells of the grid can be partitioned into exactly two enclosed walks.

Construct a beautiful grid, or determine that it is impossible to do so.

Input

The first line contains two integers and (1 \le n, m \le 100) — the size of the grid.

Output

On the first line output "YES" if the field exists, and "NO" otherwise.

If the answer is YES, on the following lines output characters from {R, D, L, U} — the description of the grid.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading

Note

In the first example, the output grid is:

RRD

ULL

DLL

RRU

It can be represented as exactly two enclosed walks. For instance:

  1. (1,1)\to(1,2)\to(1,3)\to(2,3)\to(2,2)\to(2,1)\to(1,1).

  2. (3,1)\to(4,1)\to(4,2)\to(4,3)\to(3,3)\to(3,2)\to(3,1).

Both enclosed walks follow the arrows, are disjoint, and together contain all n \cdot m cells. Therefore, the output is valid.

In the second example, it can be shown that it is impossible to construct a beautiful 3 \times 3 grid.

Scoring

  1. ( points) n=m=2;

  2. ( points) n=m=4;

  3. ( points) n=2;

  4. ( points) n=4;

  5. ( points) Both and are even;

  6. ( points) No additional restrictions.