#include <bits/stdc++.h>
using namespace std;
vector<pair<int, char>> ans;
vector<pair<int, int>> in;
int T = 0;
bool can(vector<int>& v, int val, int idx) {
  vector<int> x = v;
  vector<pair<int, char>> temp, temp2;
  for (int i = 0; i < v.size(); i++) {
    if (i + 1 < v.size() && v[i] > v[i + 1]) {
      temp.push_back({i + 1 + T, 'R'});
      v[i] += v[i + 1];
      v.erase(v.begin() + i + 1);
      i = -1;
    } else if (i - 1 >= 0 && v[i] > v[i - 1]) {
      temp.push_back({i + 1 + T, 'L'});
      v[i] += v[i - 1];
      v.erase(v.begin() + i - 1);
      i = -1;
    }
  }
  int j = x.size();
  for (int i = x.size() - 1; i >= 0; i--) {
    if (i + 1 < x.size() && x[i] > x[i + 1]) {
      temp2.push_back({i + 1 + T, 'R'});
      x[i] += x[i + 1];
      x.erase(x.begin() + i + 1);
      i = x.size();
    } else if (i - 1 >= 0 && x[i] > x[i - 1]) {
      temp2.push_back({i + 1 + T, 'L'});
      x[i] += x[i - 1];
      x.erase(x.begin() + i - 1);
      i = x.size();
    }
  }
  if ((v.size() == 1 && v[0] == val)) {
    for (int i = 0; i < temp.size(); i++) ans.push_back(temp[i]);
    return true;
  } else if ((x.size() == 1 && x[0] == val)) {
    for (int i = 0; i < temp2.size(); i++) ans.push_back(temp2[i]);
    return true;
  }
  return false;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int k;
  cin >> k;
  vector<int> b(k), c;
  for (int i = 0; i < k; i++) {
    cin >> b[i];
  }
  int cnt = 0, j = 0, s = 0;
  vector<vector<int>> ab(k + 1);
  for (int i = 0; i < n; i++) {
    cnt += a[i];
    ab[j].push_back(a[i]);
    if (j < k && cnt == b[j]) {
      cnt = 0;
      j++;
    }
  }
  if (ab[k].size()) {
    cout << "NO\n";
    return 0;
  }
  for (int i = 0; i < k; i++) {
    if (!can(ab[i], b[i], i)) {
      cout << "NO\n";
      return 0;
    }
    T++;
  }
  cout << "YES\n";
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i].first << " " << ans[i].second << "\n";
  }
}
