#include <bits/stdc++.h>
using namespace std;
int n, m, k;
vector<pair<int, string>> ans;
void f(int &k, int cnt, string s) {
  if (k == 0 || cnt == 0) return;
  if (k > cnt * s.size())
    ans.push_back({cnt, s}), k -= cnt * s.size();
  else {
    if (k >= s.size()) ans.push_back({k / s.size(), s});
    if (k % s.size()) {
      string t;
      for (int i = 0; i < k % s.size(); i++) t += s[i];
      ans.push_back({1, t});
    }
    k = 0;
  }
}
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> k;
  if (k > 4 * n * m - 2 * n - 2 * m) {
    cout << "NO\n";
    return 0;
  }
  cout << "YES\n";
  f(k, m - 1, "R");
  f(k, m - 1, "L");
  f(k, 1, "D");
  for (int i = 2; i <= n; i++) {
    f(k, m - 1, "R");
    f(k, m - 1, "UDL");
    if (i != n)
      f(k, 1, "D");
    else
      f(k, n - 1, "U");
  }
  cout << ans.size() << "\n";
  for (auto &i : ans) cout << i.first << " " << i.second << "\n";
  return 0;
}
