#include <bits/stdc++.h>
const int N = 1e5 + 10;
const int MOD = 1e9 + 7;
const int INF = 2e9;
using namespace std;
vector<long long> a;
long long b[N], f[N];
int n, k;
vector<pair<int, char> > ans;
bool sol(int left, int right, long long total) {
  long long maxx = 0, pos;
  for (int i = left; i <= right; i++)
    if (a[i] > maxx) {
      maxx = a[i];
      pos = i;
    } else if (a[i] == maxx) {
      if (a[i] > a[i - 1]) {
        pos = i;
      } else if (i < right && a[i] > a[i + 1])
        pos = i;
    }
  int cnt = right - left + 1;
  while (cnt > 1) {
    if (pos < right && a[pos] > a[pos + 1]) {
      a[pos] += a[pos + 1];
      a.erase(a.begin() + pos + 1);
      right--;
      ans.push_back({pos + 1, 'R'});
    } else if (pos > left && a[pos] > a[pos - 1]) {
      a[pos] += a[pos - 1];
      a.erase(a.begin() + pos - 1);
      ans.push_back({pos + 1, 'L'});
      pos--;
      right--;
    } else
      return 0;
    cnt--;
  }
  return 1;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  a.resize(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  cin >> k;
  for (int i = 0; i < k; i++) cin >> b[i];
  int it = -1;
  for (int i = 0; i < k; i++) {
    long long sum = 0;
    int jt = it;
    while (jt < n - 1 && sum + a[jt + 1] <= b[i]) {
      sum += a[jt + 1];
      jt++;
    }
    if (sum < b[i]) {
      cout << "NO";
      return 0;
    }
    f[i] = jt - it;
    it = jt;
  }
  if (it < n - 1) {
    cout << "NO";
    return 0;
  }
  int left = -1, right;
  for (int i = 0; i < k; i++) {
    left++;
    right = f[i] + left - 1;
    if (!sol(left, right, b[i])) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES\n";
  for (int i = 0; i < ans.size(); i++)
    cout << ans[i].first << " " << ans[i].second << endl;
  return 0;
}
