#include <bits/stdc++.h>
using namespace std;
const int maxn = 4e5 + 1;
const int mod = 1000000007;
int a[1000];
int b[1000];
vector<pair<int, int> > ans;
bool check(int l, int r) {
  if (l == r) return true;
  vector<int> q;
  for (int i = l; i < r; i++) {
    if (a[i] != a[i + 1]) return true;
  }
  return false;
}
int pr = 0;
void toAns(int l, int r) {
  if (l == r) return;
  vector<pair<int, int> > q;
  for (int i = l; i < r + 1; i++) q.push_back({a[i], i - l});
  int f = 1;
  while (!q.empty()) {
    int er = 0;
    int mx = 0;
    for (int i = 0; i < q.size(); i++) mx = max(mx, q[i].first);
    for (int i = 1; i < q.size(); i++) {
      if (q[i - 1].first > q[i].first && q[i - 1].first == mx) {
        ans.push_back({q[i - 1].second + pr, 1});
        q[i - 1].first += q[i].first;
        er = i;
        break;
      } else if (q[i - 1].first < q[i].first && q[i].first == mx) {
        ans.push_back({q[i].second + pr, 0});
        q[i].first += q[i - 1].first;
        er = i - 1;
        break;
      }
    }
    q.erase(q.begin() + er, q.begin() + er + 1);
    for (int i = 0; i < q.size(); i++) q[i].second = i;
  }
}
int main() {
  srand(time(NULL));
  ios_base::sync_with_stdio(0);
  int n, m;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  cin >> m;
  for (int i = 0; i < m; i++) cin >> b[i];
  int j = 0;
  for (int i = 0; i < m; i++) {
    int l = j;
    int sum = a[l];
    while (j < n && sum < b[i]) {
      j++;
      if (j < n) sum += a[j];
    }
    if (j < n && sum == b[i] && check(l, j)) {
      toAns(l, j);
    } else {
      cout << "NO";
      return 0;
    }
    j++;
    pr++;
  }
  if (j < n) {
    cout << "NO";
    return 0;
  }
  cout << "YES\n";
  for (int i = 0; i < ans.size(); i++) {
    if (ans[i].second == 1)
      cout << ans[i].first + 1 << " R\n";
    else
      cout << ans[i].first + 1 << " L\n";
  }
  return 0;
}
