#include <bits/stdc++.h>
using namespace std;
vector<long long> a, k;
int main() {
  std::cin.tie(0);
  std::ios::sync_with_stdio(false);
  long long n, x, totalsum = 0;
  long long m;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x;
    totalsum += x;
    a.push_back(x);
  }
  cin >> m;
  for (int i = 0; i < m; i++) {
    cin >> x;
    k.push_back(x);
  }
  long long j = 0;
  vector<pair<long long, char> > out;
  for (int i = 0; i < k.size(); i++) {
    if (j == a.size()) {
      cout << "NO" << endl;
      return 0;
    }
    long long maxx = a[j], sum = 0, ok = 0;
    x = j;
    for (int h = j; h < a.size(); h++) {
      sum += a[h];
      if (sum == k[i]) {
        totalsum -= sum;
        long long temp = h;
        vector<pair<long long, char> > outtemp;
        for (int h = j; h <= temp; h++) {
          outtemp.clear();
          int y = a[h], l = h, r = h;
          long long counter = h + 1;
          while (l != x || r != temp) {
            if (l != x && l - 1 >= 0 && a[l - 1] < y) {
              outtemp.push_back({counter, 'L'});
              y += a[l - 1];
              l--;
              counter--;
            } else if (r != temp && r + 1 < a.size() && a[r + 1] < y) {
              outtemp.push_back({counter, 'R'});
              y += a[r + 1];
              r++;
            } else {
              y = -1;
              break;
            }
          }
          if (y != -1) {
            ok = 1;
            break;
          }
        }
        if (!ok && j != temp) {
          cout << "NO" << endl;
          return 0;
        }
        for (int h = 0; h < outtemp.size(); h++) out.push_back(outtemp[h]);
        if (temp != j) a.erase(a.begin() + j, a.begin() + temp);
        j++;
        break;
      } else if (sum > k[i]) {
        cout << "NO" << endl;
        return 0;
      }
    }
    if (!ok) {
      cout << "NO" << endl;
      return 0;
    }
  }
  if (totalsum != 0) {
    cout << "NO" << endl;
    return 0;
  }
  cout << "YES" << endl;
  for (int i = 0; i < out.size(); i++) {
    cout << out[i].first << " " << out[i].second << endl;
  }
  return 0;
}
