#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, ans = 0, k, a[1005], b[1005], l[1005], r[1005], x[1005], sm,
                   f = 0;
  ios_base::sync_with_stdio(false);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  cin >> k;
  for (int i = 0; i < k; i++) {
    cin >> b[i];
  }
  int s = 0, e = 0, pr = 0;
  for (int i = 0; i < k; i++) {
    sm = a[e];
    while (e < n && sm < b[i]) {
      sm += a[++e];
    }
    if (sm != b[i]) {
      f = 1;
      break;
    } else {
      e++;
      int mpos = -1;
      long long int mx = 0;
      for (int j = s; j < e; j++) {
        if (mx < a[j]) {
          if (j - 1 >= s && a[j - 1] < a[j] || j + 1 < e && a[j + 1] < a[j]) {
            mx = a[j];
            mpos = j;
          }
        }
      }
      if (mx == 0 && (s + 1) < e) {
        f = 1;
        break;
      } else if (s + 1 == e) {
        x[i] = 1000;
        l[i] = 0;
        r[i] = 0;
        pr += e - s - 1;
        s = e;
      } else {
        if (mpos - 1 >= s && a[mpos - 1] < a[mpos]) {
          x[i] = -1 * (mpos - pr);
          r[i] = e - mpos - 1;
          l[i] = mpos - s - 1;
        } else {
          x[i] = mpos - pr;
          r[i] = e - mpos - 2;
          l[i] = mpos - s;
        }
        pr += e - s - 1;
        s = e;
      }
    }
  }
  if (f == 1 || e != n)
    cout << "NO";
  else {
    cout << "YES\n";
    for (int i = 0; i < k; i++) {
      if (x[i] < 0) {
        cout << -1 * x[i] + 1 << " L"
             << "\n";
        for (int j = 0; j < r[i]; j++) {
          cout << -1 * x[i] << " R\n";
        }
        for (int j = 0; j < l[i]; j++) {
          cout << -1 * x[i] - j << " L\n";
        }
      } else if (x[i] != 1000) {
        cout << x[i] + 1 << " R"
             << "\n";
        for (int j = 0; j < r[i]; j++) {
          cout << x[i] + 1 << " R\n";
        }
        for (int j = 0; j < l[i]; j++) {
          cout << x[i] - j + 1 << " L\n";
        }
      }
    }
  }
}
