#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int n, m, k;
vector<string> cmd;
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m >> k;
  ll maxr = 4 * n * m - 2 * m - 2 * n;
  if (maxr < k) {
    cout << "NO" << endl;
    return 0;
  }
  cout << "YES" << endl;
  int cnt = 0;
  for (int i = 0; i + 1 < n && cnt < k; ++i) {
    if (m > 1) {
      if (cnt + m - 1 <= k) {
        cmd.push_back(to_string(m - 1) + " R");
        cnt += m - 1;
      } else {
        if (cnt < k) {
          cmd.push_back(to_string(k - cnt) + " R");
          cnt = k;
        }
        break;
      }
      if (cnt + m - 1 <= k) {
        cmd.push_back(to_string(m - 1) + " L");
        cnt += m - 1;
      } else {
        if (cnt < k) {
          cmd.push_back(to_string(k - cnt) + " L");
          cnt = k;
        }
        break;
      }
    }
    if (cnt < k) {
      cmd.push_back("1 D");
      ++cnt;
    }
  }
  if (cnt < k && m > 1) {
    if (cnt + m - 1 <= k) {
      cmd.push_back(to_string(m - 1) + " R");
      cnt += m - 1;
    } else {
      cmd.push_back(to_string(k - cnt) + " R");
      cnt = k;
    }
  }
  for (int i = 0; i + 1 < m && cnt < k; ++i) {
    if (n > 1) {
      if (cnt + n - 1 <= k) {
        cmd.push_back(to_string(n - 1) + " U");
        cnt += n - 1;
      } else {
        if (cnt < k) {
          cmd.push_back(to_string(k - cnt) + " U");
          cnt = k;
        }
        break;
      }
      if (cnt + n - 1 <= k) {
        cmd.push_back(to_string(n - 1) + " D");
        cnt += n - 1;
      } else {
        if (cnt < k) {
          cmd.push_back(to_string(k - cnt) + " D");
          cnt = k;
        }
        break;
      }
    }
    if (cnt < k) {
      cmd.push_back("1 L");
      ++cnt;
    }
  }
  if (cnt < k) {
    cmd.push_back(to_string(k - cnt) + " U");
    cnt = k;
  }
  cout << cmd.size() << endl;
  for (auto& s : cmd) cout << s << endl;
  return 0;
}
