#include <bits/stdc++.h>
using namespace std;
const int T = 1000;
const long long MAX = 1000000000000007;
const long long MOD = 100000000;
long long n, m, k;
vector<long long> A[T];
vector<pair<char, int> > ans;
long long K[T];
long long N[T];
int main() {
  cin >> n;
  for (int i = (int)0; i <= (int)n - 1; i++) {
    cin >> N[i];
  }
  cin >> k;
  for (int i = (int)0; i <= (int)k - 1; i++) {
    cin >> K[i];
  }
  int j = 0;
  for (int i = (int)0; i <= (int)k - 1; i++) {
    long long sum = 0;
    while (sum < K[i] && j <= n - 1) {
      sum += N[j];
      A[i].push_back(N[j]);
      j++;
    }
    if (sum != K[i]) {
      cout << "NO" << endl;
      return 0;
    }
    if (A[i].size() == 1) {
      continue;
    }
    long long ma = 0;
    for (int g = (int)0; g <= (int)A[i].size() - 1; g++) {
      ma = max(ma, A[i][g]);
    }
    bool can = false;
    for (int g = (int)0; g <= (int)A[i].size() - 1; g++) {
      if (A[i][g] == ma) {
        if (g != 0 && A[i][g - 1] < ma ||
            g != A[i].size() - 1 && A[i][g + 1] < ma) {
          can = true;
        }
        if (can) {
          while (A[i].size() != 1) {
            if (g != 0 && A[i][g - 1] < ma) {
              ma = ma + A[i][g - 1];
              A[i][g - 1] = ma;
              ans.push_back(make_pair('L', i + g + 1));
              A[i].erase(A[i].begin() + g - 1);
              g--;
            } else {
              if (g != A[i].size() - 1 && A[i][g + 1] < ma) {
                ma = ma + A[i][g + 1];
                A[i][g] = ma;
                ans.push_back(make_pair('R', i + g + 1));
                A[i].erase(A[i].begin() + g);
              }
            }
          }
          break;
        }
      }
    }
    if (!can) {
      cout << "NO" << endl;
      return 0;
    }
  }
  if (j == n) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
    return 0;
  }
  for (int i = (int)0; i <= (int)ans.size() - 1; i++) {
    cout << ans[i].second << " " << ans[i].first << endl;
  }
  return 0;
}
