#include <bits/stdc++.h>
using namespace std;
int n, k, sum, l, r, cnt, a[510], b[510], c[510], f[510];
char g[510];
bool Check(int l, int r, int x) {
  if (l == r - 1) return 1;
  for (int i = 0; i < r - l; i++) c[i] = a[l + i];
  bool flag = 1;
  for (int i = 1; i < r - l; i++)
    if (c[i] != c[i - 1]) flag = 0;
  if (flag) return 0;
  for (int j = r - l; j > 1; j--) {
    int mx = 0;
    for (int i = 0; i < j; i++) mx = max(mx, c[i]);
    for (int i = 0; i < j; i++)
      if (c[i] == mx)
        if (i > 0 && c[i - 1] < c[i]) {
          f[cnt] = x + i;
          g[cnt++] = 'L';
          c[i - 1] += c[i];
          for (int kk = i; kk < j; kk++) c[kk] = c[kk + 1];
          break;
        } else if (i < j - 1 && c[i + 1] < c[i]) {
          f[cnt] = x + i;
          g[cnt++] = 'R';
          c[i] += c[i + 1];
          for (int kk = i + 1; kk < j; kk++) c[kk] = c[kk + 1];
          break;
        }
  }
  return 1;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  scanf("%d", &k);
  cnt = l = r = 0;
  for (int i = 0; i < k; i++) {
    scanf("%d", &b[i]);
    sum = 0;
    while (sum < b[i] && r < n) sum += a[r++];
    if (sum != b[i] || !Check(l, r, i + 1)) {
      printf("NO\n");
      return 0;
    }
    l = r;
  }
  if (r < n)
    printf("NO\n");
  else {
    printf("YES\n");
    for (int i = 0; i < cnt; i++) printf("%d %c\n", f[i], g[i]);
  }
  return 0;
}
