#include <bits/stdc++.h>
using namespace std;
int dx[]{1, -1, 0, 0, 1, -1, 1, -1};
int dy[]{0, 0, 1, -1, 1, -1, -1, 1};
long long suf(long long x) { return (x * (x + 1)) / 2; }
const long long mod = 1e9 + 7, oo = 1e9;
int n, m, u, v, z, k;
vector<pair<int, char> > ans;
int shift = 0;
int go(vector<int>& v) {
  if (v.size() == 1) return 1;
  int mx = 0;
  for (int i = 0; i < v.size(); i++) {
    mx = max(mx, v[i]);
  }
  int idx = -1;
  for (int i = 0; i < v.size(); i++) {
    if (v[i] == mx) {
      if (i + 1 < v.size() && v[i] > v[i + 1]) idx = i;
      if (i - 1 < v.size() && v[i] > v[i - 1]) idx = i;
    }
  }
  if (idx == -1) return -1;
  while (v.size() > 1) {
    while (idx + 1 < v.size() && v[idx] > v[idx + 1])
      v[idx] += v[idx + 1], v.erase(v.begin() + idx + 1),
          ans.push_back(make_pair(idx + shift, 'R'));
    while (idx - 1 < v.size() && v[idx] > v[idx - 1])
      v[idx] += v[idx - 1], v.erase(v.begin() + idx - 1),
          ans.push_back(make_pair(idx + shift, 'L')), idx--;
    while (idx + 1 < v.size() && v[idx] > v[idx + 1])
      v[idx] += v[idx + 1], v.erase(v.begin() + idx + 1),
          ans.push_back(make_pair(idx + shift, 'R'));
    while (idx - 1 < v.size() && v[idx] > v[idx - 1])
      v[idx] += v[idx - 1], v.erase(v.begin() + idx - 1),
          ans.push_back(make_pair(idx + shift, 'L')), idx--;
  }
  return 1;
}
int main() {
  string s;
  while (cin >> n) {
    vector<long long> v(n);
    for (int i = 0; i < n; i++) scanf("%I64d", &v[i]);
    cin >> k;
    deque<long long> q(k), q1(k);
    for (int i = 0; i < k; i++) scanf("%I64d", &q[i]), q1[i] = q[i];
    bool ok = 1;
    vector<int> tmp;
    int j = 0;
    for (int i = 0; i < k; i++) {
      int sum = 0;
      while (j < n && sum < q[i]) sum += v[j], tmp.push_back(v[j++]);
      if (sum > q[i] || sum < q[i]) {
        ok = 0;
        break;
      }
      int ret = go(tmp);
      if (ret == -1) {
        ok = 0;
        break;
      }
      tmp.clear();
      shift++;
    }
    if (ok == 0 || j < n)
      cout << "NO" << endl;
    else {
      cout << "YES" << endl;
      for (int i = 0; i < ans.size(); i++)
        cout << ans[i].first + 1 << " " << ans[i].second << endl;
    }
  }
  return 0;
}
