#include <bits/stdc++.h>
int mod = 998244353;
long long int inf = 1000000000000000000;
using namespace std;
mt19937 unlucko(chrono::steady_clock::now().time_since_epoch().count());
int main() {
  iostream::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int m;
  cin >> m;
  vector<int> b(m);
  for (int i = 0; i < m; i++) cin >> b[i];
  reverse(a.begin(), a.end());
  reverse(b.begin(), b.end());
  int seg = 0;
  vector<string> ans;
  while (!b.empty()) {
    int ba = b.back(), sum = 0;
    b.pop_back();
    vector<int> temp;
    while (sum < ba && !a.empty()) {
      sum += a.back();
      temp.push_back(a.back());
      a.pop_back();
    }
    if (sum != ba) {
      cout << "NO\n";
      return 0;
    }
    seg++;
    int maxs = 0, num;
    bool l = false, r = false;
    if (temp.size() == 1) continue;
    for (int i = 0; i < temp.size(); i++) {
      if (temp[i] > maxs && ((i && temp[i - 1] < temp[i]) ||
                             (i != temp.size() - 1 && temp[i + 1] < temp[i]))) {
        maxs = temp[i];
        num = i;
        l = false;
        r = false;
        if (i && temp[i - 1] < temp[i]) l = true;
        if (i != temp.size() - 1 && temp[i + 1] < temp[i]) r = true;
      }
    }
    if (l) {
      int x = num, y = temp.size() - num - 1;
      while (x) {
        ans.push_back(to_string(seg + x) + " L");
        --x;
      }
      while (y) {
        ans.push_back(to_string(seg) + " R");
        --y;
      }
    } else if (r) {
      int x = num, y = temp.size() - num - 1;
      while (y) {
        ans.push_back(to_string(seg + num) + " R");
        --y;
      }
      while (x) {
        ans.push_back(to_string(seg + x) + " L");
        --x;
      }
    } else {
      cout << "NO\n";
      return 0;
    }
  }
  if (!a.empty() || !b.empty()) {
    cout << "NO\n";
    return 0;
  }
  cout << "YES\n";
  for (auto it : ans) cout << it << "\n";
}
