#include <bits/stdc++.h>
using namespace std;
int n, k;
int a[555];
int s[555];
int b[555];
int ans[555][2];
int m;
bool solve(int x, int y, int p) {
  if (x + 1 == y) return 1;
  int z = x;
  for (int i = (int)(x + 1); i < (int)(y); ++i) {
    if (z + 1 == i && a[z] == a[i] && (z == x || a[z - 1] == a[z])) z = i;
    if (a[z] < a[i]) z = i;
  }
  if (z + 1 == y && a[z] == a[x]) return 0;
  if (z > x && a[z - 1] == a[z]) {
    ans[m][0] = p + z - x;
    ans[m][1] = 1;
    ++m;
    --y;
  }
  for (int i = (int)(z - x); i > (0); --i) {
    ans[m][0] = p + i;
    ans[m][1] = 0;
    ++m;
  }
  for (int i = (int)(z + 1); i < (int)(y); ++i) {
    ans[m][0] = p;
    ans[m][1] = 1;
    ++m;
  }
  return 1;
}
int main() {
  scanf("%d", &n);
  for (int i = (int)(1); i < (int)(n + 1); ++i) {
    scanf("%d", a + i);
    s[i] = s[i - 1] + a[i];
  }
  scanf("%d", &k);
  for (int i = (int)(0); i < (int)(k); ++i) {
    scanf("%d", b + i);
  }
  int x = 0;
  int y = 0;
  for (int i = (int)(1); i < (int)(n + 1); ++i) {
    if (y >= k || s[i] - s[x] > b[y]) {
      printf("NO\n");
      return 0;
    }
    if (s[i] - s[x] == b[y]) {
      if (!solve(x + 1, i + 1, y + 1)) {
        printf("NO\n");
        return 0;
      }
      x = i;
      ++y;
    }
  }
  if (y != k) {
    printf("NO\n");
  } else {
    printf("YES\n");
    for (int i = (int)(0); i < (int)(m); ++i) {
      printf("%d %c\n", ans[i][0], ans[i][1] ? 'R' : 'L');
    }
  }
  return 0;
}
