/* 44 - 01*/

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

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

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

class NODE{
public:
	int x1;
	int y1;
	int x2;
	int y2;
	int depth;
};

bool done[52][52][52][52];

int main(){
	int X,Y,tx,ty,kx,ky;
	char data[2][52][52];
	while(cin >> X >> Y , X){
		rep(k,2)rep(i,52)rep(j,52)data[k][i][j] = '#';
		vector<string> vec[2];
		vec[0].resize(Y);vec[1].resize(Y);
		rep(i,Y)cin >> vec[0][i] >> vec[1][i] ;
		
		rep(i,Y)rep(j,X){
			char c = vec[0][i][j];
			if(c == 'L')tx = 1+j , ty = i+1;
			data[0][1+i][1+j] = c;
		}
		
		rep(i,Y){
			rep(j,X){
				char c = vec[1][i][j];
				if(c == 'R')kx = 1+j , ky = i+1;
				data[1][1+i][1+j] = c;
			}
		}
		queue<NODE> Q;
		NODE t = {tx,ty,kx,ky,0};
		
		rep(i,52)rep(j,52)rep(k,52)rep(l,52)done[i][j][k][l] = false;
		
		Q.push(t);
		while(Q.size()){
			NODE q = Q.front();Q.pop();
			//if(q.depth >= 100)continue;
			if( done[q.x1][q.y1][q.x2][q.y2] )continue;
			done[q.x1][q.y1][q.x2][q.y2] = true;
			
			if(data[0][q.y1][q.x1] == '%' || data[1][q.y2][q.x2] == '%'){
				if(data[0][q.y1][q.x1] == '%' && data[1][q.y2][q.x2] == '%'){
					cout << "Yes" << endl;
					goto end;	
				}
				continue;
			}
			rep(i,4){
				NODE next;
				next.x1 = q.x1 + dx[i];
				next.y1 = q.y1 + dy[i];
				next.x2 = q.x2 + dx2[i];
				next.y2 = q.y2 + dy2[i];
				next.depth = q.depth + 1;
				if(data[0][next.y1][next.x1] == '#'){
					next.x1 = q.x1;
					next.y1 = q.y1;
				}
				if(data[1][next.y2][next.x2] == '#'){
					next.x2 = q.x2;
					next.y2 = q.y2;
				}
				Q.push(next);
			}
		}
		cout << "No" << endl;
		end:;	
	}

}