#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  int start[500];
  long long end[500];
  cin >> n;
  for (int i = 0; i < n; i++) cin >> start[i];
  cin >> k;
  for (int i = 0; i < k; i++) cin >> end[i];
  vector<int> num;
  vector<char> eat;
  int j = 0, low, save;
  long long sum;
  for (int i = 0; i < k; i++) {
    sum = 0;
    low = j;
    while (j < n && sum < end[i]) {
      sum += start[j];
      j++;
    }
    save = j;
    if (sum != end[i]) {
      cout << "NO";
      return 0;
    }
    int count = j - low;
    for (int c = 0; c < count - 1; c++) {
      int maxval = start[low];
      for (int ind = low + 1; ind < j; ind++) {
        if (start[ind] > maxval) maxval = start[ind];
      }
      bool flag = false;
      for (int ind = low; ind < j; ind++) {
        if (ind > low && start[ind] == maxval && start[ind] > start[ind - 1]) {
          start[ind - 1] = start[ind] + start[ind - 1];
          num.push_back(i + ind - low + 1);
          eat.push_back('L');
          for (int ii = ind; ii < j - 1; ii++) start[ii] = start[ii + 1];
          j--;
          flag = true;
          break;
        } else if (ind < j - 1 && start[ind] == maxval &&
                   start[ind] > start[ind + 1]) {
          start[ind] = start[ind] + start[ind + 1];
          num.push_back(i + ind - low + 1);
          eat.push_back('R');
          for (int ii = ind + 1; ii < j - 1; ii++) start[ii] = start[ii + 1];
          j--;
          flag = true;
          break;
        }
      }
      if (!flag) {
        cout << "NO";
        return 0;
      }
    }
    j = save;
  }
  if (j < n) {
    cout << "NO\n";
    return 0;
  }
  int size = num.size();
  cout << "YES\n";
  for (int i = 0; i < size; i++) {
    cout << num[i] << " " << eat[i] << endl;
  }
  return 0;
}
