#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, s = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') s = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return s * x;
}
long long n, m, tot, x[100005], y[100005], z[100005], a[100005], b[100005];
int main() {
  long long i, j, k, l, p, q, r;
  n = read();
  for (i = 1; i <= n; ++i) a[i] = read();
  m = read();
  for (i = 1; i <= m; ++i) b[i] = read();
  for (i = n, l = m, tot = 0; i; i = j - 1) {
    for (j = i, k = a[j]; j > 1 && k < b[l]; k += a[--j])
      ;
    if (k != b[l]) {
      printf("NO\n");
      return 0;
    } else {
      l--;
      if (l == 0 && j > 1) {
        printf("NO\n");
        return 0;
      }
      for (p = j, q = 0; p <= i; ++p) q = max(q, a[p]);
      for (p = j, r = 0; p <= i; ++p)
        if ((q == a[p]) &&
            ((p != j && a[p - 1] < q) || (p != i && a[p + 1] < q))) {
          tot++;
          x[tot] = j;
          y[tot] = i;
          z[tot] = p;
          r = 1;
          break;
        }
      if (r == 0 && j < i) {
        printf("NO\n");
        return 0;
      }
    }
  }
  if (l != 0) {
    printf("NO\n");
    return 0;
  }
  printf("YES\n");
  for (i = 1; i <= tot; ++i)
    if (x[i] != y[i]) {
      if (z[i] != y[i] && a[z[i]] > a[z[i] + 1]) {
        for (j = 1; j <= y[i] - z[i]; ++j) printf("%I64d R\n", z[i]);
        for (j = z[i]; j > x[i]; --j) printf("%I64d L\n", j);
      } else {
        for (j = z[i]; j > x[i]; --j) printf("%I64d L\n", j);
        for (j = 1; j <= y[i] - z[i]; ++j) printf("%I64d R\n", x[i]);
      }
    }
  return 0;
}
