#define _USE_MATH_DEFINES
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <cstring>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <queue>
#include <deque>
#include <stack>
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <numeric>
#include <functional>
#include <cctype>
#include <list>
#include <limits>
#include <cassert>
//#include <boost/multiprecision/cpp_int.hpp>



using namespace std;
using Int = long long;
//using namespace boost::multiprecision;

const double EPS = (1e-10);
long long const MOD = 1000000007;

long long mod_pow(long long x, long long n) {
    long long res = 1;
    for(int i = 0;i < 60; i++){
        if(n >> i & 1) res = res * x % MOD;
        x = x * x % MOD;
    }
    return res;
}

template<typename T>
T gcd(T a, T b) {
    return b != 0 ? gcd(b, a % b) : a;
}

template<typename T>
T lcm(T a, T b) {
    return a * b / gcd(a, b);
}

void fastInput() {
    cin.tie(0);
    ios::sync_with_stdio(false);
}

struct Coordinate {
    int w, h;
};

struct State {
    int lh, lw, rh, rw;
};

int v[60][60][60][60];

int solve(int W, int H) {
    vector<string> roomL;
    vector<string> roomR;

    for (int h = 0; h <= H+1; h++) {
        string tmp;
        for (int w = 0; w <= W+1; w++) {
            tmp.push_back('#');
        }
        roomL.push_back(tmp);
        roomR.push_back(tmp);
    }

    Coordinate Lgoal;
    Coordinate Lstart;
    Coordinate Rgoal;
    Coordinate Rstart;

    for (int h = 1; h <= H; h++) {
        for (int w = 1; w <= W; w++) {
            char c; cin >> c;
            roomL[h][w] = c;
            if (roomL[h][w] == '%') {
                Lgoal.h = h;
                Lgoal.w = w;
            }
            if (roomL[h][w] == 'L') {
                Lstart.h = h;
                Lstart.w = w;
            }
        }
        for (int w = 1; w <= W; w++) {
            char c; cin >> c;
            roomR[h][w] = c;
            if (roomR[h][w] == '%') {
                Rgoal.h = h;
                Rgoal.w = w;
            }
            if (roomR[h][w] == 'R') {
                Rstart.h = h;
                Rstart.w = w;
            }
        }
    }

    memset(v, 0, sizeof(v));
    int ldw[] = {0, 1, 0, -1};
    int ldh[] = {-1, 0, 1, 0};
    int rdw[] = {0, -1, 0, 1};
    int rdh[] = {-1, 0, 1, 0};

    State crt = {Lstart.h, Lstart.w, Rstart.h, Rstart.w};
    queue<State> q;
    q.push(crt);
    v[crt.lh][crt.lw][crt.rh][crt.rw] = 1;

    while (!q.empty()) {
        crt = q.front();
        q.pop();
        State nextState;
        for (int i = 0; i < 4; i++) {
            nextState.lh = crt.lh + ldh[i];
            nextState.lw = crt.lw + ldw[i];
            nextState.rh = crt.rh + rdh[i];
            nextState.rw = crt.rw + rdw[i];

            int flag[2] = {0};
            if (roomL[nextState.lh][nextState.lw] == '%') flag[0] = 1;
            if (roomR[nextState.rh][nextState.rw] == '%') flag[1] = 1;
            if (flag[0] + flag[1] == 1) continue;

            if (roomL[nextState.lh][nextState.lw] == '#') {
                nextState.lh = crt.lh;
                nextState.lw = crt.lw;
            }
            if (roomR[nextState.rh][nextState.rw] == '#') {
                nextState.rh = crt.rh;
                nextState.rw = crt.rw;
            }
            if (v[nextState.lh][nextState.lw][nextState.rh][nextState.rw] == 0) {
                v[nextState.lh][nextState.lw][nextState.rh][nextState.rw] = 1;
                q.push(nextState);
            }
        }
    }
    return v[Lgoal.h][Lgoal.w][Rgoal.h][Rgoal.w];
}

int main(void) {
    int W, H;
    vector<int> ans;
    while (1) {
        cin >> W >> H;
        if (!W && !H) break;
        ans.push_back(solve(W, H));
    }
    for (auto &i : ans) {
        if (i) cout << "Yes" << endl;
        else cout << "No" << endl;
    }
}





Measured memory_bytes: 54496