#include <bits/stdc++.h>
using namespace std;
const int maxn = 500 + 20;
int a[maxn];
int b[maxn];
int n, k;
vector<int> arr;
struct node {
  int pos;
  char ch;
  node() {}
  node(int a, char b) : pos(a), ch(b) {}
} show[maxn];
int lenshow;
bool slove(int begin, int end, int how) {
  if (begin == end) return true;
  int mx = -(0x3f3f3f3f);
  arr.clear();
  for (int i = 1; i <= how; ++i) arr.push_back((0x3f3f3f3f));
  for (int i = begin; i <= end; ++i) {
    mx = max(mx, a[i]);
  }
  int pos = (0x3f3f3f3f);
  for (int i = begin; i <= end; ++i) {
    if (a[i] == mx) {
      if (i > begin && mx > a[i - 1]) {
        pos = i - begin + 1;
        break;
      }
      if (i < end && mx > a[i + 1]) {
        pos = i - begin + 1;
        break;
      }
    }
  }
  if (pos == (0x3f3f3f3f)) return false;
  for (int i = begin; i <= end; ++i) arr.push_back(a[i]);
  vector<int>::iterator it = arr.begin() + pos + how - 1;
  vector<int>::iterator it2;
  int all = end - begin + 1;
  pos = pos + how - 1;
  int tbegin = how;
  int tend = arr.size() - 1;
  while (true) {
    if (pos > tbegin && arr[pos] > arr[pos - 1]) {
      show[++lenshow] = node(pos, 'L');
      arr[pos - 1] += arr[pos];
      it2 = it;
      arr.erase(it2);
      it--;
      pos--;
      all--;
      tend = arr.size() - 1;
      if (all == 1) return true;
    }
    if (pos < tend && arr[pos] > arr[pos + 1]) {
      show[++lenshow] = node(pos, 'R');
      arr[pos + 1] += arr[pos];
      it2 = it;
      arr.erase(it2);
      tend = arr.size() - 1;
      all--;
      if (all == 1) return true;
    }
  }
  return true;
}
void work() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
  }
  scanf("%d", &k);
  for (int i = 1; i <= k; ++i) {
    scanf("%d", &b[i]);
  }
  int how = 1;
  int begin = 1;
  int up = 0;
  for (int i = 1; i <= k; ++i) {
    int total = 0;
    bool flag = false;
    int tbegin = begin;
    while (begin <= n) {
      total += a[begin];
      if (total == b[i]) {
        flag = slove(tbegin, begin, how);
        up = begin;
        how++;
        begin++;
        break;
      }
      begin++;
      if (total > b[i]) {
        printf("NO\n");
        return;
      }
    }
    if (flag == false) {
      printf("NO\n");
      return;
    }
  }
  if (up != n) {
    cout << "NO" << endl;
    return;
  }
  cout << "YES" << endl;
  for (int i = 1; i <= lenshow; ++i) {
    printf("%d %c\n", show[i].pos, show[i].ch);
  }
}
int main() {
  work();
  return 0;
}
