#include <bits/stdc++.h>
using namespace std;
const int N = 510;
int n, k;
int a[N], b[N];
vector<int> groupBegin;
vector<int> groupMaxIdx;
bool check() {
  int j = 0, sum = 0;
  groupBegin.push_back(0);
  for (int i = 0; i < n; i++) {
    if (j == k) return false;
    sum += a[i];
    if (sum == b[j]) {
      if (i < n - 1) groupBegin.push_back(i + 1);
      j++;
      sum = 0;
    } else if (sum > b[j]) {
      return false;
    }
  }
  groupBegin.push_back(n);
  for (int j = 0; j < k; j++) {
    if (groupBegin[j + 1] == groupBegin[j] + 1) continue;
    bool flag = false;
    for (int i = groupBegin[j] + 1; i < groupBegin[j + 1]; i++)
      if (a[i] != a[i - 1]) {
        flag = true;
        break;
      }
    if (!flag) return false;
  }
  return j == k;
}
void findGroupMax() {
  for (int i = 0; i < k; i++) {
    int maxIdx = groupBegin[i];
    for (int j = groupBegin[i] + 1; j < groupBegin[i + 1]; j++)
      if (a[j] > a[maxIdx]) maxIdx = j;
    if (maxIdx == groupBegin[i] && groupBegin[i] + 1 < groupBegin[i + 1]) {
      while (a[maxIdx + 1] == a[maxIdx]) maxIdx++;
    }
    groupMaxIdx.push_back(maxIdx);
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", a + i);
  scanf("%d", &k);
  for (int i = 0; i < k; i++) scanf("%d", b + i);
  if (!check()) {
    printf("NO\n");
    return 0;
  }
  findGroupMax();
  printf("YES\n");
  for (int i = k - 1; i >= 0; i--) {
    int toTheEnd = groupBegin[i + 1] - groupMaxIdx[i] - 1;
    int pos = groupMaxIdx[i];
    if (groupBegin[i] + 1 != groupBegin[i + 1] && a[pos + 1] == a[pos])
      printf("%d L\n", pos-- + 1);
    for (int j = 0; j < toTheEnd; j++) printf("%d R\n", pos + 1);
    for (; pos > groupBegin[i]; pos--) printf("%d L\n", pos + 1);
  }
  return 0;
}
