#include <bits/stdc++.h>
using namespace std;
int n, k;
bool gotovo = false;
int a[505], b[505];
vector<pair<int, char> > resenje;
void ispisi(int l, int d) {
  if (l == d) return;
  int trenInd = d;
  bool nevinost = false;
  for (int(i) = (d); (i) >= (l); (i)--) {
    if (a[trenInd] < a[i]) {
      nevinost = true;
      trenInd = i;
    }
    if (a[trenInd] > a[i]) nevinost = true;
  }
  if (!nevinost) {
    cout << "NO\n";
    gotovo = true;
    return;
  }
  if (trenInd == d && a[trenInd - 1] == a[trenInd]) {
    int glupost = trenInd;
    while (a[glupost] == a[trenInd]) glupost--;
    glupost++;
    for (int(i) = (glupost); (i) >= (l + 1); (i)--) resenje.push_back({i, 'L'});
    for (int(i) = (glupost + 1); (i) <= (d); (i)++) resenje.push_back({l, 'R'});
    return;
  }
  for (int(i) = (trenInd + 1); (i) <= (d); (i)++)
    resenje.push_back({trenInd, 'R'});
  for (int(i) = (trenInd); (i) >= (l + 1); (i)--) resenje.push_back({i, 'L'});
}
int main() {
  cin >> n;
  for (int(i) = (1); (i) <= (n); (i)++) cin >> a[i];
  cin >> k;
  for (int(i) = (1); (i) <= (k); (i)++) cin >> b[i];
  int trenInd = n, pretInd;
  for (int(i) = (k); (i) >= (1); (i)--) {
    int trenSum = 0;
    pretInd = trenInd;
    while (trenSum < b[i] && trenInd > 0) {
      trenSum += a[trenInd];
      trenInd--;
    }
    if (trenSum != b[i]) {
      cout << "NO\n";
      return 0;
    }
    ispisi(trenInd + 1, pretInd);
    if (gotovo) return 0;
  }
  if (trenInd != 0) {
    cout << "NO\n";
    return 0;
  }
  int sz = resenje.size();
  cout << "YES\n";
  for (int(i) = (0); (i) <= (sz - 1); (i)++)
    cout << resenje[i].first << " " << resenje[i].second << endl;
  return 0;
}
