#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <cmath>
using namespace std;

char L[52][52], R[52][52];
int W, H, sx1, sy1, sx2, sy2, gx1, gy1, gx2, gy2;
int dx1[4] = { 0, 0,+1,-1};
int dy1[4] = {-1,+1, 0, 0};
int dx2[4] = { 0, 0,-1,+1};
int dy2[4] = {-1,+1, 0, 0};
bool memo[52][52][52][52];

struct State{
	int x1, y1, x2, y2;
	State(int x1_, int y1_, int x2_, int y2_){
		x1 = x1_; y1 = y1_; x2 = x2_; y2 = y2_;
	}
};

void debug(int x1, int y1, int x2, int y2){
	cout << "[left]" << endl;
	for(int y=0 ; y < H ; y++ ){
		for(int x=0 ; x < W ; x++ ){
			if( x == x1 && y == y1 ){
				cout << "L";
			}else{
				cout << L[y][x];
			}
		}
		cout << endl;
	}
	cout << "[right]" << endl;
	for(int y=0 ; y < H ; y++ ){
		for(int x=0 ; x < W ; x++ ){
			if( x == x2 && y == y2 ){
				cout << "R";
			}else{
				cout << R[y][x];
			}
		}
		cout << endl;
	}
	cout << endl;
}

bool bfs(){
	for(int a=0 ; a < 52 ; a++ )
		for(int b=0 ; b < 52 ; b++ )
			for(int c=0 ; c < 52 ; c++ )
				for(int d=0 ; d < 52 ; d++ )
					memo[a][b][c][d] = false;
	queue<State> q;
	q.push( State(sx1, sy1, sx2, sy2) );
	
	while( !q.empty() ){
		int x1 = q.front().x1, y1 = q.front().y1, x2 = q.front().x2, y2 = q.front().y2;
		q.pop();
		
		if( memo[x1][y1][x2][y2] ) continue;
		memo[x1][y1][x2][y2] = true;
		
		for(int i=0 ; i < 4 ; i++ ){
			int mx1 = x1 + dx1[i], my1 = y1 + dy1[i];
			int mx2 = x2 + dx2[i], my2 = y2 + dy2[i];
			if( mx1 < 0 || my1 < 0 || W <= mx1 || H <= my1 || L[my1][mx1] == '#' ){
				mx1 = x1; my1 = y1;
			}
			if( mx2 < 0 || my2 < 0 || W <= mx2 || H <= my2 || R[my2][mx2] == '#' ){
				mx2 = x2; my2 = y2;
			}
			if( mx1 == gx1 && my1 == gy1 && mx2 == gx2 && my2 == gy2 ){
				return true;
			}else if( mx1 == gx1 && my1 == gy1 ){
			}else if( mx2 == gx2 && my2 == gy2 ){
			}else{
				if( !memo[mx1][my1][mx2][my2] ){
					q.push( State(mx1, my1, mx2, my2) );
				}
			}
		}
	}
	return false;
}

int main(){
	while( cin >> W >> H , W || H ){
		for(int y=0 ; y < H ; y++ ){
			cin >> L[y] >> R[y];
		}
		for(int y=0 ; y < H ; y++ ){
			for(int x=0 ; x < W ; x++ ){
				if( L[y][x] == 'L' ){
					sx1 = x; sy1 = y; L[y][x] = '.';
				}
				if( R[y][x] == 'R' ){
					sx2 = x; sy2 = y; R[y][x] = '.';
				}
				if( L[y][x] == '%' ){
					gx1 = x; gy1 = y; L[y][x] = '.';
				}
				if( R[y][x] == '%' ){
					gx2 = x; gy2 = y; R[y][x] = '.';
				}
			}
		}
		cout << (bfs()? "Yes" : "No") << endl;
	}
}