#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <queue>
using namespace std;

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

int w, h;
int slx, sly, srx, sry;
int glx, gly, grx, gry;
bool visit[50][50][50][50];
string L[50], R[50];

const int dx[] = { 1, 0, -1, 0 };
const int dy[] = { 0, 1, 0, -1 };

struct C { int lx, ly, rx, ry; };

void bfs(int lx, int ly, int rx, int ry)
{
    queue<C> que;
    que.push((C){ lx, ly, rx, ry });
    visit[lx][ly][rx][ry] = true;
    
    while (!que.empty()) {
        C cur = que.front(); que.pop();
        
        rep(i, 4) {
            lx = cur.lx + dx[i];
            ly = cur.ly + dy[i];
            rx = cur.rx - dx[i];
            ry = cur.ry + dy[i];
            if (lx < 0 || w <= lx) lx = cur.lx;
            if (ly < 0 || h <= ly) ly = cur.ly;
            if (rx < 0 || w <= rx) rx = cur.rx;
            if (ry < 0 || h <= ry) ry = cur.ry;
            if (L[ly][lx] == '#') lx = cur.lx, ly = cur.ly;
            if (R[ry][rx] == '#') rx = cur.rx, ry = cur.ry;
            if (visit[lx][ly][rx][ry]) continue;
            
            if ((lx == glx && ly == gly && (rx != grx || ry != gry))
             || (rx == grx && ry == gry && (lx != glx || ly != gly)))
                continue;
            
            que.push((C){ lx, ly, rx, ry });
            visit[lx][ly][rx][ry] = true;
        }
    }
}

int main()
{
    while (cin >> w >> h, w && h) {
        rep(i, h) cin >> L[i] >> R[i];
        
        rep(i, h) rep(j, w) {
            if (L[i][j] == 'L') sly = i, slx = j;
            if (R[i][j] == 'R') sry = i, srx = j;
            if (L[i][j] == '%') gly = i, glx = j;
            if (R[i][j] == '%') gry = i, grx = j;
        }
        
        fill_n(***visit, 50*50*50*50, false);
        bfs(slx, sly, srx, sry);
        
        cout << (visit[glx][gly][grx][gry] ? "Yes" : "No") << endl;
    }
}