#include <bits/stdc++.h>
#define ll long long
#define pii pair<int, int>
using namespace std;

int di[] = {-1, 0, 1, 0};
int dj[] = {0, -1, 0, 1};

struct Info {
    int li, lj, ri, rj;
    Info(int i, int j, int k, int l) : li(i), lj(j), ri(k), rj(l) {}
};

int used[55][55][55][55];

int main() {
    int w, h;
    while (cin >> w >> h, w | h) {
        string L[h], R[h];
        for (int i = 0; i < h; i++) cin >> L[i] >> R[i];
        int yl, xl, yr, xr;
        int yt, xt, yk, xk;
        for (int i = 0; i < h; i++) {
            for (int j = 0; j < w; j++) {
                if (L[i][j] == '%') {
                    L[i][j] == '.';
                    yl = i, xl = j;
                } else if (L[i][j] == 'L') {
                    yt = i, xt = j;
                }
                if (R[i][j] == '%') {
                    yr = i, xr = j;
                    R[i][j] == '.';
                } else if (R[i][j] == 'R') {
                    yk = i, xk = j;
                }
            }
        }
        queue<Info> q;
        q.push(Info(yt, xt, yk, xk));
        memset(used, 0, sizeof(used));
        bool flag = false;
        used[yt][xt][yk][yt] = 1;
        while (!q.empty()) {
            int li = q.front().li;
            int lj = q.front().lj;
            int ri = q.front().ri;
            int rj = q.front().rj;
            q.pop();
            if (li == yl && lj == xl || ri == yr && rj == xr) {
                if (li == yl && lj == xl && ri == yr && rj == xr){
                    flag = true;
                    break;
                }
                continue;
            }
            for (int i = 0; i < 4; i++) {
                int nli = li + di[i];
                int nlj = lj + dj[i];
                int nri = ri + di[i];
                int nrj = rj - dj[i];
                if (nli < 0 || nlj < 0 || nli >= h || nlj >= w || L[nli][nlj] == '#') {
                    nli = li, nlj = lj;
                }
                if (nri < 0 || nrj < 0 || nri >= h || nrj >= w || R[nri][nrj] == '#') {
                    nri = ri, nrj = rj;
                }
                if (!used[nli][nlj][nri][nrj]) {
                    used[nli][nlj][nri][nrj] = 1;
                    q.push(Info(nli, nlj, nri, nrj));
                }
            }
        }
        if (flag) {
            cout << "Yes" << endl;
        } else {
            cout << "No" << endl;
        }
    }
    return 0;
}

