#include <bits/stdc++.h>
using namespace std;
void erase(deque<int>& q, int idx) {
  if (idx == 0)
    q.pop_front();
  else if (idx == (int)q.size() - 1)
    q.pop_back();
  else
    q.erase(q.begin() + idx);
}
int main() {
  int n, k;
  scanf("%d", &n);
  deque<int> v(n);
  for (int i = 0; i < n; i++) scanf("%d", &v[i]);
  scanf("%d", &k);
  vector<int> t(k);
  for (int i = 0; i < k; i++) scanf("%d", &t[i]);
  vector<int> begs(1, 0);
  int beg = 0;
  for (int i = 0; i < k; i++) {
    int tar = t[i];
    int s = 0;
    set<int> ss;
    for (int j = beg; j < n; j++) {
      s += v[j];
      ss.insert(v[j]);
      if (s == tar && ((int)ss.size() > 1 || beg - j + 1 == (int)ss.size())) {
        beg = j + 1;
        goto here;
      } else if (s > tar) {
        printf("NO\n");
        return 0;
      }
    }
    if (s != tar || (int)ss.size() < 2) {
      printf("NO\n");
      return 0;
    }
  here:;
    begs.push_back(beg);
  }
  int idx = 0;
  if (beg != n) {
    cout << "NO\n";
    return 0;
  }
  printf("YES\n");
  for (int i = 0; i + 1 < (int)begs.size(); i++) {
    deque<int> pos;
    for (int j = begs[i]; j < begs[i + 1]; j++) {
      pos.push_back(v[j]);
    }
    while ((int)pos.size() > 1) {
      int mx = 0, p;
      for (int i = 0; i < (int)pos.size(); i++) mx = max(mx, pos[i]);
      for (int i = 0; i < (int)pos.size(); i++) {
        bool done = false;
        if (pos[i] == mx) {
          if (i == 0) {
            if (pos[i] > pos[i + 1]) {
              pos[i] += pos[i + 1];
              pos.erase(pos.begin() + (i + 1));
              printf("%d R\n", i + 1 + idx);
              done = true;
            }
          } else if (i == (int)pos.size() - 1) {
            if (pos[i] > pos[i - 1]) {
              pos[i] += pos[i - 1];
              pos.erase(pos.begin() + (i - 1));
              printf("%d L\n", i + 1 + idx);
              done = true;
            }
          } else {
            if (pos[i] > pos[i + 1]) {
              pos[i] += pos[i + 1];
              pos.erase(pos.begin() + (i + 1));
              printf("%d R\n", i + 1 + idx);
              done = true;
            } else if (pos[i] > pos[i - 1]) {
              pos[i] += pos[i - 1];
              pos.erase(pos.begin() + (i - 1));
              printf("%d L\n", i + 1 + idx);
              done = true;
            }
          }
        }
        if (done) break;
      }
    }
    idx++;
  }
  return 0;
}
