#include <bits/stdc++.h>
using namespace std;
struct Message {
  int num;
  char lr;
  Message(int num, char lr) : num(num), lr(lr){};
  void print() { cout << this->num << ' ' << this->lr << '\n'; }
};
int n, k, sum, maxx, maxx_id, mn_size;
vector<int> st, fn, mn;
vector<Message> output;
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  st.resize(n);
  for (int iter = 0; iter < n; iter++) cin >> st[iter];
  cin >> k;
  fn.resize(k);
  for (int iter = 0; iter < k; iter++) cin >> fn[iter];
  int i = 0;
  int j = 0;
  while (i <= n && j < k) {
    if (sum > fn[j]) {
      cout << "NO\n";
      return 0;
    } else if (sum < fn[j]) {
      if (i == n) break;
      sum += st[i];
      mn.push_back(st[i]);
      i++;
    } else {
      if (mn.size() == 1) {
        mn.resize(0);
        sum = 0;
        j++;
        continue;
      }
      maxx = *max_element(mn.begin(), mn.end());
      maxx_id = -1;
      mn_size = mn.size();
      for (int l = 0; l < mn.size(); l++) {
        if ((l + 1 < mn.size() && mn[l] == maxx && mn[l] > mn[l + 1]) ||
            (l - 1 >= 0 && mn[l] == maxx && mn[l] > mn[l - 1])) {
          maxx_id = l;
          break;
        }
      }
      if (maxx_id == -1) {
        cout << "NO\n";
        return 0;
      }
      if (maxx_id == 0) {
        output.push_back({maxx_id + j + 1, 'R'});
        mn_size--;
      } else if (maxx_id + 1 == mn.size()) {
        output.push_back({maxx_id + j + 1, 'L'});
        maxx_id--;
        mn_size--;
      } else if (mn[maxx_id] > mn[maxx_id + 1]) {
        output.push_back({maxx_id + j + 1, 'R'});
        mn_size--;
      } else {
        output.push_back({maxx_id + j + 1, 'L'});
        maxx_id--;
        mn_size--;
      }
      while (maxx_id + 1 < mn_size) {
        output.push_back({maxx_id + j + 1, 'R'});
        mn_size--;
      }
      while (mn_size > 1) {
        output.push_back({maxx_id + j + 1, 'L'});
        mn_size--;
        maxx_id--;
      }
      mn.resize(0);
      sum = 0;
      j++;
    }
  }
  if (output.size() < n - k || i < n || j < k) {
    cout << "NO\n";
  } else {
    cout << "YES\n";
    for (auto msg : output) {
      msg.print();
    }
  }
  return 0;
}
