#include <bits/stdc++.h>
using namespace std;
int n, m, k, cnt, len;
string s, ans;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 3) + (x << 1) + (ch ^ 48);
    ch = getchar();
  }
  return x * f;
}
inline void print() {
  int n = ans.size(), cnt = 0;
  for (int l = 0, r; l < n; l = r + 1) {
    r = l;
    while (r < n - 1 && ans[l] == ans[r + 1]) ++r;
    ++cnt;
  }
  printf("%d\n", cnt);
  for (int l = 0, r; l < n; l = r + 1) {
    r = l;
    while (r < n - 1 && ans[l] == ans[r + 1]) ++r;
    printf("%d %c\n", r - l + 1, ans[l]);
  }
}
int main() {
  n = read(), m = read(), k = read();
  cnt = 4 * n * m - 2 * n - 2 * m;
  if (k > cnt) {
    printf("NO\n");
    return 0;
  }
  printf("YES\n");
  s = "";
  s += 'D';
  for (int i = 1; i < m; ++i) s += 'R';
  for (int i = m; i < 2 * m - 1; ++i) s += 'L';
  len = 2 * m - 1;
  int tot = 0;
  while (k >= len && tot < n - 1) ++tot, k -= len;
  for (int i = 1; i <= tot; ++i) ans += s;
  if (k == 0) {
    print();
    return 0;
  }
  if (tot != n - 1) {
    ans += 'D';
    int l = 0;
    --k;
    while (k && l < m - 1) --k, ans += 'R', ++l;
    while (k) --k, ans += 'L';
    print();
    return 0;
  }
  if (k <= tot) {
    for (int i = 1; i <= k; ++i) ans += 'U';
    print();
    return 0;
  }
  for (int i = 1; i <= tot; ++i) ans += 'U';
  k -= tot;
  s = "";
  s += 'R';
  for (int i = 1; i < n; ++i) s += 'D';
  for (int i = n; i < 2 * n - 1; ++i) s += 'U';
  len = 2 * n - 1;
  tot = 0;
  while (k >= len && tot < m - 1) ++tot, k -= len;
  for (int i = 1; i <= tot; ++i) ans += s;
  if (k == 0) {
    print();
    return 0;
  }
  if (tot != m - 1) {
    ans += 'R';
    int l = 0;
    --k;
    while (k && l < n - 1) --k, ans += 'D', ++l;
    while (k) --k, ans += 'U';
    print();
    return 0;
  }
  for (int i = 1; i <= k; ++i) ans += 'L';
  print();
  return 0;
}
