#include <bits/stdc++.h>
struct Debuger {
  template <typename T>
  Debuger& operator,(const T& v) {
    std::cerr << v << " ";
    return *this;
  }
} dbg;
const int N = 1e5 + 10;
const int M = 50;
const int MOD = 1e9 + 7;
int a[N];
int b[N];
char s[N];
std::pair<int, int> answer[N];
std::vector<int> vs, ks;
int main() {
  int n;
  scanf("%d", &n);
  int sa = 0;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", a + i);
    sa += a[i];
    vs.push_back(a[i]);
  }
  int m;
  scanf("%d", &m);
  int sb = 0;
  for (int i = 0; i < m; ++i) {
    scanf("%d", b + i);
    sb += b[i];
  }
  if (sa != sb) {
    puts("NO");
  } else {
    bool mark = true;
    int toper = 0;
    int idx = 1;
    int okIdx = 0;
    for (; okIdx < m;) {
      ks.clear();
      int ta = 0;
      for (int i = 0; i < vs.size(); ++i) {
        ta += vs[i];
        if (ta < b[okIdx]) {
          ks.push_back(vs[i]);
        } else {
          ks.push_back(vs[i]);
          break;
        }
      }
      if (ta != b[okIdx]) {
        ;
        mark = false;
        break;
      }
      for (int i = 0; i < ks.size(); ++i) {
        vs.erase(vs.begin());
      };
      int mxIdx = -1, mxv = 0;
      for (; ks.size() > 1;) {
        for (int i = 0; i < ks.size(); ++i) {
          if (ks[i] > mxv) {
            if (i + 1 < ks.size() && ks[i] > ks[i + 1] ||
                (i > 0 && ks[i] > ks[i - 1])) {
              mxv = ks[i];
              mxIdx = i;
            }
          }
        }
        if (mxIdx == -1) {
          mark = false;
          break;
        };
        int eat = 0;
        if (mxIdx + 1 < ks.size() && ks[mxIdx] > ks[mxIdx + 1]) {
          answer[toper++] = {okIdx + mxIdx + 1, 1};
          ks[mxIdx + 1] += mxv;
        } else if (mxIdx > 0 && ks[mxIdx] > ks[mxIdx - 1]) {
          answer[toper++] = {okIdx + mxIdx + 1, 0};
          ks[mxIdx - 1] += mxv;
        } else {
          mark = false;
          break;
        }
        ks.erase(ks.begin() + mxIdx);
      }
      ++okIdx;
    }
    if (mark) {
      puts("YES");
      for (int i = 0; i < toper; ++i) {
        printf("%d ", answer[i].first);
        if (answer[i].second) {
          puts("R");
        } else {
          puts("L");
        }
      }
    } else {
      puts("NO");
    }
  }
  return 0;
}
