#include <bits/stdc++.h>
using namespace std;
vector<string> displays(vector<int> arr, int delta) {
  int pos = 0;
  int big = INT_MIN;
  int n = arr.size();
  int bf = 0;
  int after = 0;
  vector<string> toret;
  for (int i = 0; i < n; ++i) {
    if (arr[i] >= big) {
      big = arr[i];
      pos = i;
    }
  }
  bf = pos - 1;
  after = pos + 1;
  while (after < n) {
    arr[pos] += arr[after];
    after++;
    string tmp = to_string(delta + pos) + " R";
    toret.push_back(tmp);
  }
  int fin = pos;
  while (~bf && arr[pos] <= arr[bf]) {
    pos--;
    bf--;
  }
  while (~bf) {
    arr[pos] += arr[bf];
    bf--;
    string tmp = to_string(delta + bf + 2) + " L";
    toret.push_back(tmp);
  }
  while (pos < fin) {
    string tmp = to_string(delta) + " R";
    toret.push_back(tmp);
    pos++;
  }
  return toret;
}
int main() {
  int n, k;
  cin >> n;
  vector<int> orig(n);
  vector<string> ans;
  for (int i = 0; i < n; ++i) cin >> orig[i];
  cin >> k;
  vector<int> left(k);
  for (int i = 0; i < k; ++i) cin >> left[i];
  int actpos = 0;
  int recpos = 0;
  for (int i = 0; i < k; ++i) {
    int needed = 0;
    int sum = 0;
    int endi = actpos;
    vector<int> inr;
    for (int j = actpos; j < n && sum < left[i]; ++j, endi++) {
      sum += orig[j];
      inr.push_back(orig[j]);
    }
    if (sum != left[i]) {
      cout << "NO\n";
      return 0;
    }
    if (endi == actpos + 1) {
      actpos = endi;
      continue;
    }
    bool isbad = true;
    for (int k = actpos + 1; k < endi; ++k) {
      if (orig[k] != orig[k - 1]) {
        isbad = false;
      }
    }
    if (isbad) {
      cout << "NO\n";
      return 0;
    }
    auto tmp = displays(inr, i + 1);
    for (auto a : tmp) {
      ans.push_back(a);
    }
    actpos = endi;
  }
  if (actpos < n) {
    cout << "NO\n";
    return 0;
  }
  cout << "YES\n";
  for (auto a : ans) cout << a << "\n";
  return 0;
}
