// flows

#include <iostream>
#include <sstream>
#include <algorithm>
#include <vector>
#include <cassert>
#include <utility>
#include <cstdio>

using namespace std;

#define taskId "pawns"

const int nmax = 100;
const int kmax = 1000;
const int gmax = 2 + nmax + kmax*2;
const int S = 0;

int n, m, p, k; // p == amount of pawns
int T;
pair<int, int> piece[kmax];
pair<int, int> pawn[nmax];

int g[gmax][gmax];

bool v[gmax];
int move[nmax];
int next[kmax + 1];
int prev[kmax + 1];

extern "C" void* memset(void*, int, size_t);

void ReadData()
{
    scanf("%d%d%d%d", &n, &m, &p, &k);
    assert(n >= 1 && n <= nmax && m >= 1 && m <= nmax && k >= 1 && k <= kmax && k <= (n - 1)*m);
    assert(p >= 0 && p <= m);
    for (int i = 0; i < p; ++i) {
        int y;
        scanf("%d", &y);
        assert(y >= 1 && y <= m);
        pawn[i] = make_pair(1, y);
    }
    for (int i = 0; i < k; ++i) {
        int x, y;
        scanf("%d%d", &x, &y);
        assert(2 <= x && x <= n && 1 <= y && y <= m);
        piece[i] = make_pair(x, y);
    }
}

inline void AddEdge(int x, int y) {
    g[x][y] = 1;
}

void MarkEdgesFrom(int x, int y, int id)
{
    for (int j = 0; j < k; ++j) {
        if (x < piece[j].first && abs(y - piece[j].second) == 1) {
            AddEdge(id, 1 + p + j);
        }
    }
}

void ConstructGraph()
{
    memset(g, 0, sizeof(g));   
    for (int i = 1; i <= p; ++i) {
        AddEdge(S, i);
    }
    for (int i = 0; i < p; ++i) {
        MarkEdgesFrom(pawn[i].first, pawn[i].second, 1 + i);
    }
    for (int j = 0; j < k; ++j) {
        MarkEdgesFrom(piece[j].first, piece[j].second, 1 + p + k + j);
        AddEdge(1 + p + j, 1 + p + k + j);
    }
    T = 1 + p + 2*k;
    for (int j = 0; j < k; ++j) {
        AddEdge(1 + p + k + j, T);
    }
}

bool Dfs(int x, int target = T)
{
    if (x == target)
        return true;
    v[x] = true;
    for (int j = 0; j <= T; ++j) {
        if (!v[j] && g[x][j] == 1) {
            if (Dfs(j, target)) {
                g[x][j] = 0;
                g[j][x] = 1;
                return true;
            }
        }
    }
    return false;
}

void MaxFlow()
{
    do {
        memset(v, 0, sizeof(v));
    } while (Dfs(S));
}

bool Impossible()
{
    for (int j = 0; j < k; ++j) {
        g[1 + p + k + j][1 + p + j] = 0;
    }
    for (int j = 0; j < k; ++j) {
        if (g[1 + p + j][1 + p + k + j] == 1) {
            memset(v, 0, sizeof(v));
            if (!Dfs(1 + p + k + j, 1 + p + j)) {
                return true;
            }
            for (int jj = 0; jj < k; ++jj) {
                g[1 + p + k + jj][1 + p + jj] = 0;
            }
            g[1 + p + j][1 + p + k + j] = 0;
        }
    }
    return false;
}

inline bool Flows(int x, int y) {
    return (g[x][y] == 0 && g[y][x] == 1);
}

void RestorePaths()
{
    memset(next, -1, sizeof(next));
    memset(prev, -1, sizeof(prev));
    for (int i = 0; i < p; ++i) {
        move[i] = k;
    }
    prev[k] = p;
    next[k] = k;

    for (int i = 0; i < p; ++i) {
        for (int j = 0; j < k; ++j) {
            if (Flows(1 + i, 1 + p + j)) {
                assert(move[i] == k && prev[j] == -1);
                move[i] = j;
                prev[j] = i;
            }
        }
    }
    for (int j = 0; j < k; ++j) {
        for (int jj = 0; jj < k; ++jj) {
            if (Flows(1 + p + k + j, 1 + p + jj)) {
                assert(next[j] == -1 && prev[jj] == -1);
                next[j] = jj;
                prev[jj] = j;
            }
        }
        if (Flows(1 + p + k + j, T)) {
            assert(next[j] == -1);
            next[j] = k;
        }
    }

    for (int j = 0; j < k; ++j) {
        assert(prev[j] != -1 && next[j] != -1);
    }
}

vector<string> toPrint;

void MakeMove(int pawnId, int pieceId)
{
    pair<int, int> & c = pawn[pawnId];
    const pair<int, int> & p = piece[pieceId];
    while (c.first < p.first) {
        ostringstream out;
        out << c.first << " " << c.second << " ";
        if (c.first + 1 == p.first) {
            out << ((c.second < p.second) ? "R" : "L");
        } else {
            out << "F";
        }
        ++c.first;
        toPrint.push_back(out.str());
    }
    assert(c.first == p.first);
    assert(abs(c.second - p.second) == 1);
    c = p;
}

void ProcessAnswer()
{
    for (int r = 2; r <= n; ++r) {
        for (int j = 0; j < k; ++j) {
            if (piece[j].first == r) {
                // first resolve conflicts
                int id = prev[j];
                int best = id;
                for (int i = 0; i < p; ++i) {
                    if (pawn[i].second == pawn[best].second && pawn[i].first > pawn[best].first && pawn[i].first < r) {
                        best = i;
                    }
                }
                // redirect
                prev[move[best]] = id;
                move[id] = move[best];

                MakeMove(best, j);
                move[best] = next[j];
                prev[next[j]] = best;
            }
        }
    }

    printf("YES\n%u\n", toPrint.size());
    for (int i = 0; i < (int)toPrint.size(); ++i) {
        printf("%s\n", toPrint[i].data());
    }
}

int main()
{
    if (taskId != "") {
        freopen(taskId ".in", "rt", stdin);
        freopen(taskId ".out", "wt", stdout);
    }

    ReadData();
    ConstructGraph();
    MaxFlow();
    if (Impossible()) {
        printf("NO\n");
        return 0;
    }
    RestorePaths();
    ProcessAnswer();

    return 0;
}
