#include <bits/stdc++.h>
using namespace std;
int n, m, k;
int ans;
char buff[100005];
int sz;
void Go(int times, const char *step) {
  if (k <= 0) return;
  int len = strlen(step);
  if (k >= times * len) {
    ++ans;
    sz += sprintf(buff + sz, "%d %s\n", times, step);
    k -= times * len;
  } else {
    if (k >= len) {
      ++ans;
      sz += sprintf(buff + sz, "%d %s\n", k / len, step);
    }
    if (k % len != 0) {
      ++ans;
      buff[sz++] = '1';
      buff[sz++] = ' ';
      for (int i = 0; i < k % len; ++i) buff[sz++] = step[i];
      buff[sz++] = '\n';
    }
    k = 0;
  }
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  if (k > 4 * n * m - 2 * n - 2 * m)
    printf("NO\n");
  else {
    printf("YES\n");
    if (m == 1) {
      if (k < n)
        printf("1\n%d D\n", k);
      else {
        printf("2\n%d D\n%d U\n", n - 1, k - n + 1);
      }
    } else {
      for (int i = 1; i <= n && k > 0; ++i) {
        if (i == 1) {
          Go(m - 1, "R");
          Go(m - 1, "L");
        } else {
          Go(m - 1, "RUD");
          Go(m - 1, "L");
        }
        if (i < n)
          Go(1, "D");
        else
          Go(n - 1, "U");
      }
      printf("%d\n%s", ans, buff);
    }
  }
  return 0;
}
