#include <bits/stdc++.h>
using namespace std;
void rampage(int arr[], int curind, int start, int endd, int whereto,
             vector<pair<int, char> >& v) {
  if (whereto == 1) {
    int orig = curind;
    for (int i = 0; i < curind - start; i++) {
      v.push_back(make_pair(orig + 1, 'L'));
      orig--;
    }
    for (int i = 0; i < endd - curind; i++) {
      v.push_back(make_pair(orig + 1, 'R'));
    }
  } else {
    int orig = curind;
    for (int i = 0; i < endd - curind; i++) {
      v.push_back(make_pair(orig + 1, 'R'));
    }
    for (int i = 0; i < curind - start; i++) {
      v.push_back(make_pair(orig + 1, 'L'));
      orig--;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  int k;
  cin >> k;
  int after[k];
  for (int i = 0; i < k; i++) {
    cin >> after[i];
  }
  int pt = 0;
  vector<pair<int, char> > v;
  for (int i = 0; i < k; i++) {
    int sum = 0;
    int mx = -1;
    int mxind = -1;
    int cur = pt;
    int done = 0;
    for (int j = pt; j < n; j++) {
      if (sum == after[i]) {
        pt = j;
        done = 1;
        break;
      }
      mx = max(arr[j], mx);
      sum += arr[j];
    }
    if (sum == after[i] && done != 1) {
      pt = n;
      done = 1;
    }
    if (done == 0) {
      cout << "NO";
      return 0;
    }
    int whereto = -1;
    for (int j = cur; j < pt; j++) {
      if (arr[j] == mx && j != cur && arr[j] > arr[j - 1]) {
        mxind = j;
        whereto = 1;
        break;
      }
      if (arr[j] == mx && j != pt - 1 && arr[j] > arr[j + 1]) {
        mxind = j;
        whereto = 0;
        break;
      }
    }
    if (mxind == -1 && pt - cur > 1) {
      cout << "NO";
      return 0;
    } else {
      if (pt - cur > 1)
        rampage(arr, mxind - cur + i, i, pt - cur + i - 1, whereto, v);
    }
  }
  if (pt != n) {
    cout << "NO";
    return 0;
  }
  cout << "YES" << endl;
  for (int i = 0; i < v.size(); i++) {
    cout << v[i].first << " " << v[i].second << endl;
  }
  return 0;
}
