#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int>> adj[1001][1001];
int n, m;
int d;
int ct = 0;
int edge_count[1001][1001];
string ans = "";
void find_path() {
  vector<pair<int, int>> circuit;
  stack<pair<int, int>> curr_path;
  curr_path.push({1, 1});
  pair<int, int> curr_v = {1, 1};
  pair<int, int> next_v;
  while (!curr_path.empty()) {
    if (edge_count[curr_v.first][curr_v.second]) {
      curr_path.push(curr_v);
      next_v = adj[curr_v.first][curr_v.second].back();
      edge_count[curr_v.first][curr_v.second]--;
      adj[curr_v.first][curr_v.second].pop_back();
      curr_v = next_v;
    } else {
      circuit.push_back(curr_v);
      curr_v = curr_path.top();
      curr_path.pop();
    }
  }
  for (int i = 1; i < circuit.size(); i++) {
    if (circuit[i].first == circuit[i - 1].first - 1)
      ans += "U";
    else if (circuit[i].first == circuit[i - 1].first + 1)
      ans += "D";
    else if (circuit[i].second == circuit[i - 1].second - 1)
      ans += "L";
    else if (circuit[i].second == circuit[i - 1].second + 1)
      ans += "R";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> d;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (i > 1) {
        adj[i][j].push_back({i - 1, j});
        ct++;
      }
      if (i < n) {
        adj[i][j].push_back({i + 1, j});
        ct++;
      }
      if (j > 1) {
        adj[i][j].push_back({i, j - 1});
        ct++;
      }
      if (j < m) {
        adj[i][j].push_back({i, j + 1});
        ct++;
      }
      edge_count[i][j] = adj[i][j].size();
    }
  }
  if (ct < d) {
    cout << "NO";
    return 0;
  }
  cout << "YES\n";
  find_path();
  vector<pair<int, char>> times;
  int len = 1;
  char ch = ans[0];
  for (int i = 1; i < d; i++) {
    if (ch == ans[i])
      len++;
    else {
      times.push_back({len, ch});
      ch = ans[i];
      len = 1;
    }
  }
  times.push_back({len, ch});
  cout << times.size() << "\n";
  for (auto it : times) cout << it.first << " " << it.second << "\n";
}
