#include <bits/stdc++.h>
using namespace std;
const int MAXN = 505;
int n, m;
int a[MAXN];
int sum[MAXN];
int b[MAXN];
int dp[MAXN][MAXN];
vector<pair<int, char> > ansv;
int calc(int l, int r) {
  if (dp[l][r] != -1) return dp[l][r];
  dp[l][r] = 0;
  if (l == r) {
    dp[l][r] = 1;
    return 1;
  }
  for (int i = l; i < r; i++) {
    if (calc(l, i) && calc(i + 1, r)) {
      int sumL = sum[i] - sum[l - 1];
      int sumR = sum[r] - sum[i];
      if (sumL != sumR) {
        dp[l][r] = 1;
        return 1;
      }
    }
  }
  return 0;
}
int getSum(int l, int r) { return sum[r] - sum[l - 1]; }
void getAns(int l, int r, int add) {
  if (l == r) {
    return;
  }
  for (int i = l; i < r; i++) {
    if (calc(l, i) && calc(i + 1, r)) {
      int sumL = sum[i] - sum[l - 1];
      int sumR = sum[r] - sum[i];
      if (sumL != sumR) {
        getAns(l, i, add);
        getAns(i + 1, r, add + 1);
        if (sumL > sumR) {
          ansv.push_back(make_pair(add + 1, 'R'));
        } else {
          ansv.push_back(make_pair(add + 2, 'L'));
        }
        return;
      }
    }
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    sum[i] = sum[i - 1] + a[i];
  }
  scanf("%d", &m);
  for (int i = 1; i <= m; i++) {
    scanf("%d", &b[i]);
  }
  memset(dp, -1, sizeof(dp));
  for (int i = 1; i <= n; i++) {
    for (int j = i; j <= n; j++) {
      calc(i, j);
    }
  }
  int l = 1, r = 1;
  for (int i = 1; i <= m; i++) {
    while (true) {
      if (r > n) {
        puts("NO");
        return 0;
      }
      int curSum = getSum(l, r);
      if (curSum < b[i]) {
        r++;
      } else if (curSum == b[i]) {
        break;
      } else {
        puts("NO");
        return 0;
      }
    }
    if (getSum(l, r) != b[i]) {
      puts("NO");
      return 0;
    }
    if (calc(l, r) == 0) {
      puts("NO");
      return 0;
    }
    getAns(l, r, i - 1);
    l = r + 1;
    r++;
  }
  if (l != n + 1) {
    puts("NO");
    return 0;
  }
  puts("YES");
  for (int i = 0; i < (int)ansv.size(); i++) {
    printf("%d %c\n", ansv[i].first, ansv[i].second);
  }
  return 0;
}
