#include <bits/stdc++.h>
using namespace std;
int main() {
  int before[500];
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> before[i];
  }
  int after[500];
  int k;
  cin >> k;
  for (int i = 0; i < k; ++i) {
    cin >> after[i];
  }
  int rangeEnd[500];
  int sum = 0;
  int idx = 0;
  for (int i = 0; i < n; ++i) {
    sum += before[i];
    if (sum == after[idx]) {
      sum = 0;
      rangeEnd[idx] = i;
      idx++;
    } else if (sum > after[idx]) {
      cout << "NO" << endl;
      return 0;
    }
  }
  if (idx != k) {
    cout << "NO" << endl;
    return 0;
  }
  int prev = -1;
  for (int i = 0; i < k; ++i) {
    if (rangeEnd[i] == prev + 1) {
      prev = rangeEnd[i];
      continue;
    }
    int num = before[prev + 1];
    idx = prev + 1;
    bool foundAlt = false;
    while (idx <= rangeEnd[i]) {
      if (before[idx] != num) {
        foundAlt = true;
        break;
      }
      idx++;
    }
    if (!foundAlt) {
      cout << "NO" << endl;
      return 0;
    }
    prev = rangeEnd[i];
  }
  cout << "YES" << endl;
  prev = -1;
  int prevDel = -1;
  for (int i = 0; i < k; ++i) {
    int addToNextPrevDel = 0;
    if (rangeEnd[i] == prev + 1) {
      prev = rangeEnd[i];
      continue;
    }
    int maxIdx = prev + 1;
    idx = prev + 1;
    while (idx <= rangeEnd[i]) {
      if (before[idx] > before[maxIdx]) {
        maxIdx = idx;
        continue;
      }
      int prevElem = 1000001;
      int nextElem = 1000001;
      if (idx > prev + 1) {
        prevElem = before[idx - 1];
      }
      if (idx < rangeEnd[i]) {
        nextElem = before[idx + 1];
      }
      if (before[maxIdx] == before[idx] &&
          (before[idx] > prevElem || before[idx] > nextElem)) {
        maxIdx = idx;
      }
      idx++;
    }
    int prevElem = 1000001;
    int nextElem = 1000001;
    if (maxIdx > prev + 1) {
      prevElem = before[maxIdx - 1];
    }
    if (idx < rangeEnd[i]) {
      nextElem = before[maxIdx + 1];
    }
    int lb = prev + 1;
    int ub = rangeEnd[i];
    int decIdx = maxIdx - 1;
    int incIdx = maxIdx + 1;
    if (before[maxIdx] > prevElem) {
      cout << maxIdx - prevDel << " " << 'L' << endl;
      prevDel++;
      decIdx--;
    } else {
      cout << maxIdx - prevDel << " " << 'R' << endl;
      incIdx++;
      addToNextPrevDel++;
    }
    while (decIdx >= lb) {
      cout << maxIdx - prevDel << " " << 'L' << endl;
      decIdx--;
      prevDel++;
    }
    while (incIdx <= ub) {
      cout << maxIdx - prevDel << " " << 'R' << endl;
      incIdx++;
      addToNextPrevDel++;
    }
    prevDel += addToNextPrevDel;
    prev = rangeEnd[i];
  }
  return 0;
}
