#include <bits/stdc++.h>
using namespace std;
using namespace std;
const int N = 1e6 + 25;
int n1, n2, a[N], b[N];
pair<long long, long long> cal(int st, int val) {
  long long sum = 0, maxv = 0, maxi = 0;
  int i;
  for (i = st; i <= n1; i++) {
    sum += a[i];
    if (a[i] > maxv &&
        ((i != st && a[i] > a[i - 1]) || (sum != val && a[i] > a[i + 1]))) {
      maxv = a[i];
      maxi = i;
    }
    if (sum > val) return {0, 0};
    if (sum == val) return {maxi, i};
  }
  return {0, 0};
}
vector<pair<int, string> > ans;
void solve() {
  cin >> n1;
  int i, j, k;
  for (i = 1; i <= n1; i++) cin >> a[i];
  cin >> n2;
  for (i = 1; i <= n2; i++) cin >> b[i];
  int start = 1, end = 1;
  for (i = 1; i <= n2; i++) {
    pair<long long, long long> P = cal(start, b[i]);
    end = P.second;
    int maxi = P.first;
    if (start == end) {
      start = end + 1;
      continue;
    }
    if (maxi == 0) break;
    int curr = maxi - (start - 1);
    int left = maxi - 1, right = maxi + 1;
    while (left >= start || right <= end) {
      if (left >= start && a[maxi] > a[left]) {
        a[maxi] += a[left];
        left--;
        ans.push_back({curr + i - 1, " L"});
        curr--;
      } else if (right <= end && a[maxi] > a[right]) {
        a[maxi] += a[right];
        right++;
        ans.push_back({curr + i - 1, " R"});
      }
    }
    start = end + 1;
  }
  if (i > n2 && start > n1) {
    cout << "YES" << endl;
    for (auto it : ans) {
      cout << it.first << it.second << endl;
    }
  } else
    cout << "NO" << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
}
