#include <bits/stdc++.h>
using namespace std;
template <typename T>
void read(vector<T>& v) {
  for (int n = v.size(), i = 0; i < n; ++i) {
    cin >> v[i];
  }
}
template <typename T>
void write(const vector<T>& v, const char* c = " ") {
  for (int n = v.size(), i = 0; i < n; ++i) {
    cout << v[i] << (i == n - 1 ? "\n" : c);
  }
}
string f(int i, int s) { return to_string(i + 1) + " " + (s > 0 ? "R" : "L"); }
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  read(a);
  int k;
  cin >> k;
  vector<int> b(k);
  read(b);
  int m = 0;
  int r = 0;
  vector<string> d;
  for (int i = 0; i < k; ++i) {
    int s = 0, j = m;
    for (; j < n; ++j) {
      s += a[j];
      if (s == b[i]) {
        break;
      }
    }
    if (j == n) {
      break;
    }
    int l = m;
    for (int z = m + 1; z <= j; ++z) {
      if (a[z] > a[l]) {
        l = z;
      } else if (a[z] == a[l]) {
        if ((z - 1 >= m && a[z - 1] < a[z]) ||
            (z + 1 <= j && a[z + 1] < a[z])) {
          l = z;
        }
      }
    }
    if (l == m) {
      if (m + 1 <= j && a[m] > a[m + 1]) {
        int c = j - m;
        while (c--) {
          d.push_back(f(m - r, +1));
        }
        r = d.size();
      }
    } else if (l == j) {
      if (j - 1 >= m && a[j - 1] < a[j]) {
        for (int c = 0; c < j - m; ++c) {
          d.push_back(f(j - c - r, -1));
        }
        r = d.size();
      }
    } else {
      if (a[l] > a[l + 1]) {
        int c = j - l;
        while (c--) {
          d.push_back(f(l - r, +1));
        }
        for (int c = 0; c < l - m; ++c) {
          d.push_back(f(l - c - r, -1));
        }
        r = d.size();
      } else if (a[l] > a[l - 1]) {
        for (int c = 0; c < l - m; ++c) {
          d.push_back(f(l - c - r, -1));
        }
        int c = j - l;
        while (c--) {
          d.push_back(f(m - r, +1));
        }
        r = d.size();
      }
    }
    m = j + 1;
  }
  long long sa = accumulate(a.begin(), a.end(), 0l);
  long long sb = accumulate(b.begin(), b.end(), 0l);
  if (d.size() == n - k && sa == sb) {
    cout << "YES\n";
    write(d, "\n");
  } else {
    cout << "NO\n";
  }
}
void configure_ios() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
}
int main() {
  configure_ios();
  solve();
  return 0;
}
