#include <bits/stdc++.h>
using namespace std;
int64_t n, m, k;
vector<pair<char, int64_t> > ans;
int64_t length = 0;
void add_to_ans(char c, int64_t len) {
  if (len < 1) {
    return;
  }
  if (length == k) {
    return;
  }
  int64_t cnt = min(k - length, len);
  length += cnt;
  ans.push_back({c, cnt});
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m >> k;
  if (k > 4 * n * m - 2 * n - 2 * m) {
    cout << "NO";
    return 0;
  }
  for (int64_t i = 0; i < n - 1; ++i) {
    add_to_ans('R', m - 1);
    add_to_ans('L', m - 1);
    add_to_ans('D', 1);
  }
  add_to_ans('R', m - 1);
  for (int64_t i = 0; i < m - 1; ++i) {
    add_to_ans('U', n - 1);
    add_to_ans('D', n - 1);
    add_to_ans('L', 1);
  }
  add_to_ans('U', n - 1);
  cout << "YES" << endl;
  cout << ans.size() << endl;
  for (int64_t i = 0; i < ans.size(); ++i) {
    cout << ans[i].second << ' ' << ans[i].first << endl;
  }
}
