#include <bits/stdc++.h>
using namespace std;
int n;
int start[500];
int k;
int endd[500];
vector<pair<int, char>> actions;
int rangeSum(int l, int r) {
  if (r - l == 1) {
    return start[l];
  }
  set<int> vals;
  for (int i = l; i < r; i++) {
    vals.insert(start[i]);
    if (vals.size() >= 2) {
      break;
    }
  }
  int sum = 0;
  if (vals.size() >= 2) {
    for (int i = l; i < r; i++) {
      sum += start[i];
    }
  }
  return sum;
}
void eatRange(int l, int r, int offset) {
  if (r - l == 1) {
    return;
  }
  int maxVal = 0;
  for (int i = l; i < r; i++) {
    maxVal = max(maxVal, start[i]);
  }
  int rl;
  int rr;
  for (int i = l; i < r; i++) {
    if (start[i] == maxVal) {
      if (i - 1 >= l && start[i - 1] < maxVal) {
        rl = i - 1;
        rr = i;
        actions.push_back(make_pair(i - offset, 'L'));
        break;
      } else if (i + 1 < r && start[i + 1] < maxVal) {
        rl = i;
        rr = i + 1;
        actions.push_back(make_pair(i - offset, 'R'));
        break;
      }
    }
  }
  for (int i = rr; i < r - 1; i++) {
    actions.push_back(make_pair(rl - offset, 'R'));
  }
  for (int i = rl; i >= l + 1; i--) {
    actions.push_back(make_pair(i - offset, 'L'));
  }
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> start[i];
  }
  cin >> k;
  for (int i = 0; i < k; i++) {
    cin >> endd[i];
  }
  int es = 0;
  for (int i = 0; i < k; i++) {
    bool made = false;
    for (int j = es + 1; j <= n; j++) {
      int rs = rangeSum(es, j);
      if (rs == endd[i]) {
        made = true;
        eatRange(es, j, es - i - 1);
        es = j;
        break;
      } else if (rs > endd[i]) {
        break;
      }
    }
    if (!made) {
      cout << "NO" << endl;
      return 0;
    }
  }
  if (es != n) {
    cout << "NO" << endl;
    return 0;
  }
  cout << "YES" << endl;
  for (int i = 0; i < actions.size(); i++) {
    cout << actions[i].first << " " << actions[i].second << endl;
  }
  return 0;
}
