#include <bits/stdc++.h>
using namespace std;
const int N = 501;
int n, k;
int a[N], b[N], c[N];
vector<pair<int, char> > answer;
bool eat(int len, int st) {
  int j = 0;
  for (int i = 0; i < len; i++) {
    if (c[i] > c[j]) j = i;
  }
  if (j == 0) {
    while (j < len - 1 && c[j + 1] == c[j]) j++;
  }
  int pos = st + j;
  int l = j - 1, r = j + 1;
  int tot = c[j];
  for (int i = 0; i < len - 1; i++) {
    if (l >= 0 && tot > c[l]) {
      tot += c[l];
      l--;
      answer.emplace_back(pos, 'L');
      pos--;
      continue;
    }
    if (r < len && tot > c[r]) {
      tot += c[r];
      r++;
      answer.emplace_back(pos, 'R');
      continue;
    }
    return false;
  }
  return true;
}
bool solve() {
  int i, j;
  for (i = 0, j = 0; j < k; j++) {
    int tot = 0, len = 0;
    while (i + len < n && tot < b[j]) {
      tot += a[i + len];
      c[len] = a[i + len];
      len++;
    }
    if (tot != b[j]) return false;
    if (!eat(len, j)) return false;
    i += len;
  }
  return i == n;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  cin >> k;
  for (int j = 0; j < k; j++) cin >> b[j];
  if (!solve()) {
    cout << "NO\n";
  } else {
    cout << "YES\n";
    for (auto p : answer) {
      cout << (p.first + 1) << ' ' << p.second << '\n';
    }
  }
  return 0;
}
