#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
template <class S, class T>
ostream& operator<<(ostream& os, const pair<S, T> v) {
  os << "(" << v.first << ", " << v.second << ")";
  return os;
}
template <class T>
ostream& operator<<(ostream& os, const vector<T> v) {
  for (int i = 0; i < (int)v.size(); i++) {
    if (i > 0) {
      os << " ";
    }
    os << v[i];
  }
  return os;
}
template <class T>
ostream& operator<<(ostream& os, const vector<vector<T>> v) {
  for (int i = 0; i < (int)v.size(); i++) {
    if (i > 0) {
      os << endl;
    }
    os << v[i];
  }
  return os;
}
template <class T>
bool chmax(T& a, const T& b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T& a, const T& b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
string num2bit(long long num, long long len) {
  string bit = "";
  for (int i = 0; i < (int)len; ++i) {
    bit += char('0' + (num >> i & 1));
  }
  return bit;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long n, m, k;
  cin >> n >> m >> k;
  if (4 * n * m - 2 * n - 2 * m < k) {
    cout << "NO" << endl;
    return 0;
  }
  vector<long long> a;
  vector<string> b;
  if (m == 1) {
    a.push_back(n - 1);
    b.push_back("D");
    a.push_back(n - 1);
    b.push_back("U");
  } else {
    for (int i = 0; i < (int)n; ++i) {
      if (i % 2 == 0) {
        a.push_back(m - 1);
        b.push_back("R");
      } else {
        a.push_back(m - 1);
        b.push_back("L");
      }
      if (i != n - 1) {
        a.push_back(1);
        b.push_back("D");
      }
    }
    for (int i = n - 1; i >= 1; i--) {
      if (i % 2 == 0) {
        a.push_back(m - 1);
        b.push_back("UDL");
      } else {
        a.push_back(m - 1);
        b.push_back("UDR");
      }
      a.push_back(1);
      b.push_back("U");
    }
    a.push_back(m - 1);
    b.push_back("L");
  }
  vector<long long> c;
  vector<string> d;
  long long now = 0;
  for (int i = 0; i < (int)a.size(); ++i) {
    long long len = a[i] * (int)b[i].size();
    if (now + len < k) {
      c.push_back(a[i]);
      d.push_back(b[i]);
      now += len;
    } else {
      long long sa = k - now;
      long long tani = (int)b[i].size();
      long long q = sa / tani;
      long long r = sa % tani;
      if (q > 0) {
        c.push_back(q);
        d.push_back(b[i]);
      }
      if (r > 0) {
        c.push_back(1);
        d.push_back(b[i].substr(0, r));
      }
      break;
    }
  }
  cout << "YES" << endl;
  cout << (int)c.size() << endl;
  for (int i = 0; i < (int)c.size(); ++i) {
    cout << c[i] << " " << d[i] << endl;
  }
  return 0;
}
