#include <bits/stdc++.h>
using namespace std;
const int MAX = 505;
int p[MAX], pref[MAX], kraj[MAX];
int n;
vector<pair<int, int> > R;
void nope() {
  printf("NO\n");
  exit(0);
}
void ajde(int l, int r) {
  int mx = -1, ind = l;
  if (l == r) return;
  for (int i = l; i < r + 1; i++) {
    if (p[i] > mx) {
      mx = p[i];
      ind = i;
    }
    if ((p[i] == mx) &&
        ((i - 1 >= l && p[i] > p[i - 1]) || (i + 1 <= r && p[i] > p[i + 1]))) {
      ind = i;
    }
  }
  int da = 0;
  for (int i = l; i < r + 1; i++)
    if (p[i] != mx) da = 1;
  if (!da) nope();
  if (r == ind || (ind < r && p[ind] > p[ind + 1])) {
    for (int i = 0; i < r - ind; i++) R.push_back(pair<int, int>(ind, 1));
    for (; ind > l; ind--) R.push_back(pair<int, int>(ind, 0));
  } else {
    for (; ind > l; ind--, r--) R.push_back(pair<int, int>(ind, 0));
    for (int i = 0; i < r - ind; i++) R.push_back(pair<int, int>(ind, 1));
  }
}
int main() {
  int m;
  scanf("%d", &n);
  for (int i = 1; i < n + 1; i++) {
    scanf("%d", &p[i]);
    pref[i] = pref[i - 1] + p[i];
  }
  scanf("%d", &m);
  for (int i = 0; i < m; i++) scanf("%d", &kraj[i]);
  int des = n;
  for (int i = m - 1; i >= 0; i--) {
    int da = 0;
    for (int j = des; j; j--) {
      if (pref[des] - pref[j - 1] == kraj[i]) {
        da = 1;
        ajde(j, des);
        des = j - 1;
        break;
      }
    }
    if (!da) nope();
  }
  if (des) nope();
  printf("YES\n");
  for (auto it : R) printf("%d %c\n", it.first, it.second ? 'R' : 'L');
  return 0;
}
