#include<bits/stdc++.h>

using namespace std;

#define rep(i,n) for(int i = 0; i < n; i++)

typedef pair<int,int> PII;

int di0[] = {0,0,1,-1};
int dj0[] = {-1,1,0,0};

int di1[] = {0,0,1,-1};
int dj1[] = {1,-1,0,0};

void solve(int h, int w){
    string b1[h];
    string b2[h];
    rep(i,h){
        cin >> b1[i] >>  b2[i];
    }
    int si1=0,si2=0,sj1=0,sj2=0;
    int gi1 = 0,gi2 = 0, gj1 = 0, gj2 = 0;
    rep(i,h)rep(j,w){
            if(b1[i][j] == 'L'){
                si1 = i;
                sj1 = j;
            }
            if(b1[i][j] == '%'){
                gi1 = i;
                gj1 = j;
            }
            if(b2[i][j] == '%'){
                gi2 = i;
                gj2 = j;
            }
            if(b2[i][j] == 'R'){
                si2 = i;
                sj2 = j;
            }
        }
    bool mp[50][50][50][50];
    memset(mp,false,sizeof(mp));
    deque<pair<PII,PII>> que;
    que.push_back({{si1,sj1},{si2,sj2}});
    mp[si1][sj1][si2][sj2] = true;

    while(! que.empty()){
        if(mp[gi1][gj1][gi2][gj2]) {
            cout << "Yes" << endl;
            return;
        }
        pair<PII,PII> p = que.front();
        que.pop_front();
        int ci[2],cj[2];

        ci[0] = p.first.first;
        cj[0] = p.first.second;

        ci[1] = p.second.first;
        cj[1] = p.second.second;

        rep(dir,4){
            int ni[2],nj[2];
            ni[0] = ci[0] + di0[dir];
            nj[0] = cj[0] + dj0[dir];

            ni[1] = ci[1] + di1[dir];
            nj[1] = cj[1] + dj1[dir];


            rep(i,2) if(ni[i] < 0) ni[i] = 0;
            rep(i,2) if(ni[i] >= h) ni[i] = h-1;
            rep(i,2) if(nj[i] < 0) nj[i] = 0;
            rep(i,2) if(nj[i] >= w) nj[i] = w-1;
            if(b1[ni[0]][nj[0]] == '#') {
                ni[0] = ci[0];
                nj[0] = cj[0];
            }
            if(b2[ni[1]][nj[1]] == '#') {
                ni[1] = ci[1];
                nj[1] = cj[1];
            }
            bool flag1 = (ni[0] == gi1 && gj1 == nj[0] );
            bool flag2 = (ni[1] == gi2 && nj[1] == gj2);
            if(mp[ni[0]][nj[0]][ni[1]][nj[1]] == false && !(flag1 ^ flag2)) {
                que.push_back({{ni[0], nj[0]},
                               {ni[1], nj[1]}});
                mp[ni[0]][nj[0]][ni[1]][nj[1]] = true;
            }

        }
    }



    cout << "No" << endl;
}
int main(){
    int w,h;
    while(true){
        cin  >> w >> h;
        if(h == 0 && w == 0) break;
        solve(h,w);

    }
    return 0;
}

