#include <bits/stdc++.h>
bool check(const std::vector<int>& monstersWeight,
           const int monstersWeightAfterHeal, const size_t num,
           size_t& startIdx, std::vector<std::pair<int, char> >& resPath) {
  int sum = 0;
  size_t idx = startIdx;
  for (size_t i = startIdx;
       i < monstersWeight.size() && sum < monstersWeightAfterHeal; i++) {
    sum += monstersWeight[i];
    idx = i;
  }
  if (sum != monstersWeightAfterHeal) return false;
  size_t maxIdx = startIdx;
  int max = monstersWeight[maxIdx];
  for (size_t i = startIdx; i <= idx; ++i) {
    if (max < monstersWeight[i]) {
      max = monstersWeight[i];
      maxIdx = i;
    }
  }
  for (size_t i = startIdx; i <= idx; ++i) {
    if (max == monstersWeight[i]) {
      if (i > startIdx && monstersWeight[i - 1] < max) {
        maxIdx = i;
        break;
      }
      if (i < idx && monstersWeight[i + 1] < max) {
        maxIdx = i;
        break;
      }
    }
  }
  size_t left = maxIdx, right = maxIdx, curIdx = maxIdx - startIdx + num;
  while (left != startIdx || right != idx) {
    if (left > startIdx && monstersWeight[left - 1] < max) {
      resPath.push_back(std::make_pair(curIdx + 1, 'L'));
      max += monstersWeight[left - 1];
      curIdx--;
      left--;
      continue;
    }
    if (right < idx && monstersWeight[right + 1] < max) {
      resPath.push_back(std::make_pair(curIdx + 1, 'R'));
      max += monstersWeight[right + 1];
      right++;
      continue;
    }
    return false;
  }
  startIdx = idx + 1;
  return true;
}
int main() {
  int monstersInQueueCount;
  std::cin >> monstersInQueueCount;
  std::vector<int> monstersWeight(monstersInQueueCount);
  for (size_t i = 0; i < monstersInQueueCount; ++i) {
    std::cin >> monstersWeight[i];
  }
  int monstersInQueueAfterHeal;
  std::cin >> monstersInQueueAfterHeal;
  std::vector<int> monstersWeightAfterHeal(monstersInQueueAfterHeal);
  for (size_t i = 0; i < monstersInQueueAfterHeal; ++i) {
    std::cin >> monstersWeightAfterHeal[i];
  }
  size_t startIdx = 0;
  std::vector<std::pair<int, char> > resPath;
  for (size_t i = 0; i < monstersInQueueAfterHeal; ++i) {
    if (!check(monstersWeight, monstersWeightAfterHeal[i], i, startIdx,
               resPath)) {
      std::cout << "NO";
      return 0;
    }
  }
  if (startIdx != monstersWeight.size()) {
    std::cout << "NO";
    return 0;
  }
  std::cout << "YES" << std::endl;
  for (size_t i = 0; i < resPath.size(); i++) {
    std::cout << resPath[i].first << " " << resPath[i].second << std::endl;
  }
}
