#include <bits/stdc++.h>
const int N = 1000100;
int lef[N], rig[N], maxpos[N], a[N], b[N], sum[N];
int main(void) {
  int n, k;
  scanf("%d", &n);
  for (register int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    sum[i] = sum[i - 1] + a[i];
  }
  scanf("%d", &k);
  for (register int i = 1; i <= k; i++) scanf("%d", &b[i]);
  bool flag;
  for (register int i = 1, l = 1; i <= k; i++) {
    int maxm = 0, pos = 0, r = l;
    flag = 0;
    for (; r <= n; r++) {
      if (a[l] == b[i]) {
        l++;
        lef[i] = rig[i] = maxpos[i] = l;
        flag = 1;
        break;
      }
      if (a[r] > a[r - 1] && r > l) {
        if (a[r] > maxm) {
          maxm = a[r];
          pos = r;
        }
        flag = 1;
      } else if (a[r] < a[r - 1] && r > l) {
        if (a[r - 1] > maxm) {
          maxm = a[r - 1];
          pos = r - 1;
        }
        flag = 1;
      }
      if (sum[r] - sum[l - 1] == b[i] && flag) {
        lef[i] = l;
        rig[i] = r;
        maxpos[i] = pos;
        l = r + 1;
        break;
      }
    }
    if (r < n || !maxpos[k]) flag = 0;
  }
  if (!flag) {
    printf("NO\n");
    return 0;
  }
  printf("YES\n");
  for (register int i = 1; i <= k; i++) {
    if (lef[i] == rig[i]) continue;
    int j = maxpos[i];
    if (a[j] > a[j - 1] && j > lef[i]) {
      while (j > lef[i]) {
        printf("%d L\n", i - 1 + j - lef[i] + 1);
        j--;
      }
      for (register int j = 1; j <= rig[i] - maxpos[i]; j++)
        printf("%d R\n", i - 1 + 1);
    } else {
      while (j < rig[i]) {
        printf("%d R\n", i - 1 + maxpos[i] - lef[i] + 1);
        j++;
      }
      for (register int j = maxpos[i]; j > lef[i]; j--)
        printf("%d L\n", i - 1 + j - lef[i] + 1);
    }
  }
  return 0;
}
