#include <iostream>
#include <vector>
#include <cstring>
#include <string>
#include <algorithm>
#include <iomanip>
#include <queue>
using namespace std;
const int INF = 1000000000;
int d[50][50][50][50];
string f[2][50];

int dx[2][4] = {
	{ 1, 0, -1, 0 },
	{ -1, 0, 1, 0 }
};

int dy[2][4] = {
	{ 0, 1, 0, -1 },
	{ 0, 1, 0, -1 }
};

int sx[2], sy[2], gx[2], gy[2];


struct State {
	int x1, y1, x2, y2;
};

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	int H, W;
	while(cin >> W >> H, H) {
		for(int y = 0; y < H; y++) {
			cin >> f[0][y] >> f[1][y];
			for(int x = 0; x < W; x++) {
				if(f[0][y][x] == 'L') sx[0] = x, sy[0] = y;
				if(f[1][y][x] == 'R') sx[1] = x, sy[1] = y;
				if(f[0][y][x] == '%') gx[0] = x, gy[0] = y;
				if(f[1][y][x] == '%') gx[1] = x, gy[1] = y;
			}
		}

		fill((int*)begin(d), (int*)end(d), INF);

		queue<State> q;
		q.push(State{ sx[0], sy[0], sx[1], sy[1] });
		d[sx[0]][sy[0]][sx[1]][sy[1]] = 0;
		while(!q.empty()) {
			State s = q.front();
			q.pop();
			for(int k = 0; k < 4; k++) {
				int nx1 = s.x1 + dx[0][k], ny1 = s.y1 + dy[0][k];
				if(nx1 < 0 || W <= nx1 || ny1 < 0 || H <= ny1 || f[0][ny1][nx1] == '#') {
					nx1 = s.x1, ny1 = s.y1;
				}
				int nx2 = s.x2 + dx[1][k], ny2 = s.y2 + dy[1][k];
				if(nx2 < 0 || W <= nx2 || ny2 < 0 || H <= ny2 || f[1][ny2][nx2] == '#') {
					nx2 = s.x2, ny2 = s.y2;
				}
				if((f[0][ny1][nx1] == '%') ^ (f[1][ny2][nx2] == '%')) {
					continue;
				}
				if(d[s.x1][s.y1][s.x2][s.y2] + 1 < d[nx1][ny1][nx2][ny2]) {
					d[nx1][ny1][nx2][ny2] = d[s.x1][s.y1][s.x2][s.y2] + 1;
					q.push(State{ nx1, ny1, nx2, ny2 });
				}
			}
		}

		if(d[gx[0]][gy[0]][gx[1]][gy[1]] == INF) {
			cout << "No" << endl;
		}
		else {
			cout << "Yes" << endl;
		}
	}

}