#include <bits/stdc++.h>
using namespace std;
const int MAXN = 510;
int n, k, fir[MAXN];
queue<int> p;
queue<char> q;
bool del[MAXN];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> fir[i];
  int final, j = 0, l;
  memset(del, 0, sizeof(del));
  cin >> k;
  for (int i = 1; i <= k; i++) {
    cin >> final;
    l = j + 1;
    while (final && j < n) {
      j++;
      final -= fir[j];
    }
    if (final) {
      puts("NO");
      return 0;
    }
    if (l == j) continue;
    int maxn = 0, no, d, s, ti;
    for (int e = l; e <= j; e++) {
      if (fir[e] > maxn) {
        maxn = fir[e];
        no = e;
        ti = 0;
      }
      if (fir[e] == maxn) ti++;
    }
    if (no == l) {
      if (ti == j - l + 1 && fir[j] == fir[l]) {
        puts("NO");
        return 0;
      } else {
        while (fir[no] == fir[no + 1]) no++;
      }
      d = 2;
    } else
      d = 1;
    if (d == 1) {
      p.push(i + no - l);
      q.push('L');
    }
    for (s = no + 1; s <= j; s++) {
      int t = i + no - l;
      if (d == 1) t--;
      p.push(t);
      q.push('R');
    }
    s = (d == 1 ? no - 2 : no - 1);
    for (; s >= l; s--) {
      int t = i + no - l;
      if (d == 1) t--;
      p.push(t);
      q.push('L');
      no--;
    }
  }
  if (j != n) {
    puts("NO");
    return 0;
  }
  puts("YES");
  while (!p.empty()) {
    cout << p.front() << ' ' << q.front() << endl;
    p.pop();
    q.pop();
  }
  return 0;
}
