#include <bits/stdc++.h>
using namespace std;
vector<string> eatSeq;
int n[500];
int k[500];
int nl;
int kl;
bool solve() {
  int nIndex = 0;
  int kIndex = 0;
  int rightBound = 0;
  int prevHoles = 0;
  while (nIndex < nl) {
    int currHoles = 0;
    int kSum = k[kIndex];
    int nSum = 0;
    int maxCanEatIndex = -1;
    bool sameAll = true;
    while (nSum < kSum && nIndex < nl) {
      int nIndexMonster = n[nIndex];
      nSum += nIndexMonster;
      if (maxCanEatIndex != -1) sameAll = sameAll && n[nIndex] == n[rightBound];
      bool biggerThanBefore = nIndexMonster >= n[maxCanEatIndex];
      bool biggerThanFollowing =
          (nSum == kSum) ? false : nIndexMonster > n[nIndex + 1];
      bool biggerThanLatter =
          nIndex == rightBound ? false : nIndexMonster > n[nIndex - 1];
      if (maxCanEatIndex == -1 ||
          (biggerThanBefore && (biggerThanFollowing || biggerThanLatter))) {
        maxCanEatIndex = nIndex;
      }
      nIndex++;
    }
    if (nSum != kSum || (sameAll && !(nIndex == rightBound + 1))) return false;
    int rightP = maxCanEatIndex + 1, leftP = maxCanEatIndex - 1;
    int maxMonsterCanEatSize = n[maxCanEatIndex];
    while (rightP < nIndex || leftP >= rightBound) {
      if (rightP < nIndex && maxMonsterCanEatSize > n[rightP]) {
        eatSeq.push_back(to_string(maxCanEatIndex + 1 - prevHoles) + " R");
        maxMonsterCanEatSize += n[rightP++];
        currHoles++;
      }
      if (leftP >= rightBound && maxMonsterCanEatSize > n[leftP]) {
        eatSeq.push_back(to_string(maxCanEatIndex-- + 1 - prevHoles) + " L");
        maxMonsterCanEatSize += n[leftP--];
        currHoles++;
      }
    }
    if (maxMonsterCanEatSize != k[kIndex]) return false;
    prevHoles += currHoles;
    rightBound = nIndex;
    kIndex++;
  }
  if (kIndex != kl) return false;
  return true;
}
int main(int argc, const char* argv[]) {
  cin >> nl;
  for (int i = 0; i < nl; i++) {
    cin >> n[i];
  }
  cin >> kl;
  for (int i = 0; i < kl; i++) {
    cin >> k[i];
  }
  if (solve()) {
    cout << "YES" << endl;
    for (int i = 0; i < eatSeq.size(); i++) {
      cout << eatSeq[i] << endl;
    }
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
