#include <bits/stdc++.h>
using namespace std;
using namespace std;
inline long long pow_mod(long long X, long long N, long long mod) {
  long long res = 1;
  while (N) {
    if (N & 1) res = res * X % mod;
    X = X * X % mod;
    N >>= 1;
  }
  return res;
}
const long long SI = 2e5 + 100;
const bool DBG = 1;
char dir[4];
int n, m;
int k;
vector<int> ansnum;
vector<string> ansS;
struct node {
  int id;
  string ans;
};
vector<node> ANS;
void dfs(int del) {
  for (int i = 1; i <= n; i++) {
    if (m > 1) {
      string go = "R";
      string bac = "L";
      if (i < n) bac = "DUL";
      ansnum.push_back(m - 1);
      ansS.push_back(go);
      ansnum.push_back(m - 1);
      ansS.push_back(bac);
    }
    if (i != n) {
      ansnum.push_back(1);
      ansS.push_back("D");
    }
  }
  if (n > 1) {
    ansnum.push_back(n - 1);
    ansS.push_back("U");
  }
}
int main() {
  int T;
  dir[0] = 'U';
  dir[1] = 'D';
  dir[2] = 'L';
  dir[3] = 'R';
  cin >> n >> m >> k;
  if (k > 4 * n * m - 2 * n - 2 * m) {
    cout << "NO" << endl;
  } else {
    dfs(0);
    cout << "YES" << endl;
    for (int i = 0; i < ((int)(ansnum.size())) && k > 0; i++) {
      int del = ansnum[i] * (int)ansS[i].length();
      int l = (int)ansS[i].length();
      if (k >= del) {
        node temp;
        temp.id = ansnum[i];
        temp.ans = ansS[i];
        ANS.push_back(temp);
        k -= del;
      } else {
        int cost = k / l;
        node temp;
        if (cost > 0) {
          temp.id = cost;
          temp.ans = ansS[i];
          ANS.push_back(temp);
        }
        if (k % l != 0) {
          int mr = k % l;
          string X = "";
          for (int h = 0; h < mr; h++) {
            X = X + ansS[i][h];
          }
          temp.id = 1;
          temp.ans = X;
          ANS.push_back(temp);
        }
        break;
      }
    }
    cout << ((int)(ANS.size())) << endl;
    for (auto it : ANS) cout << it.id << ' ' << it.ans << endl;
  }
  return 0;
}
