#include <bits/stdc++.h>
using namespace std;
mt19937 rnd(0);
const long long MAXN = 2e6 + 1, MOD = 998244353, M = 1000000001;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m, k;
  cin >> m >> n >> k;
  if (k > 4 * n * m - 2 * n - 2 * m) {
    cout << "NO";
    return 0;
  }
  cout << "YES\n";
  vector<pair<int, char>> ans;
  for (int i = 0; i < n - 1 && k; ++i) {
    if (k - m + 1 > 0 && m > 1) {
      k -= m - 1;
      ans.push_back({m - 1, 'D'});
    } else if (k && m > 1) {
      ans.push_back({k, 'D'});
      k = 0;
    }
    if (k - m + 1 > 0 && m > 1) {
      k -= m - 1;
      ans.push_back({m - 1, 'U'});
    } else if (k && m > 1) {
      ans.push_back({k, 'U'});
      k = 0;
    }
    if (k) {
      --k;
      ans.push_back({1, 'R'});
    }
  }
  if (k - m + 1 > 0 && m > 1) {
    k -= m - 1;
    ans.push_back({m - 1, 'D'});
  } else if (k && m > 1) {
    ans.push_back({k, 'D'});
    k = 0;
  }
  for (int i = 0; i < m - 1 && k; ++i) {
    if (k - n + 1 > 0 && n > 1) {
      k -= n - 1;
      ans.push_back({n - 1, 'L'});
    } else if (k && n > 1) {
      ans.push_back({k, 'L'});
      k = 0;
    }
    if (k - n + 1 > 0 && n > 1) {
      k -= n - 1;
      ans.push_back({n - 1, 'R'});
    } else if (k && n > 1) {
      ans.push_back({k, 'R'});
      k = 0;
    }
    if (k) {
      --k;
      ans.push_back({1, 'U'});
    }
  }
  if (k - n + 1 > 0 && n > 1) {
    k -= n - 1;
    ans.push_back({n - 1, 'L'});
  } else if (k && n > 1) {
    ans.push_back({k, 'L'});
    k = 0;
  }
  cout << ans.size() << '\n';
  for (auto i : ans) {
    cout << i.first << ' ' << i.second << '\n';
  }
  return 0;
}
