#include<iostream>
#include<queue>
#include<map>
#include<algorithm>

#define fs first
#define sc second
using namespace std;

typedef pair<int,int> P;
typedef pair<P,P> P2;

int main(){
  int w,h;
  string room[2][50];
  int ry,rx,ly,lx;

  while(cin >> w >> h && (w||h)){
    int ay[2],ax[2];

    for(int i=0;i<h;i++){
      for(int k=0;k<2;k++){
	cin >> room[k][i];
	for(int j=0;j<w;j++){
	  if(room[k][i][j] == 'L'){
	    ly = i; lx = j;
	    room[k][i][j] == '.';
	  }
	  if(room[k][i][j] == 'R'){
	    ry = i; rx = j;
	    room[k][i][j] = '.';
	  }
	  if(room[k][i][j] == '%'){
	    ay[k] = i; ax[k] = j;
	  }
	}
      }
    }

    bool visit[50][50][50][50];
    for(int i=0;i<h;i++)
      for(int j=0;j<w;j++)
	for(int k=0;k<h;k++)
	  for(int l=0;l<w;l++)visit[i][j][k][l] = false;

    visit[ly][lx][ry][rx] = true;
    queue<P2> q;
    q.push(P2(P(ly,lx),P(ry,rx)));

    while(q.size()){
      P2 p = q.front();q.pop();
      ly = p.fs.fs; lx = p.fs.sc; ry = p.sc.fs; rx = p.sc.sc;

      if(room[0][ly][lx] == '%' && room[1][ry][rx] == '%')break;

      int ldy[] = {-1,0,1,0}, ldx[] = {0,-1,0,1};
      int rdy[] = {-1,0,1,0}, rdx[] = {0,1,0,-1};

      for(int i=0;i<4;i++){
	int lsy = ly + ldy[i], lsx = lx + ldx[i];
	int rsy = ry + rdy[i], rsx = rx + rdx[i];
	if(lsy < 0 || h-1 < lsy)lsy = ly;
	if(lsx < 0 || w-1 < lsx)lsx = lx;
	if(room[0][lsy][lsx] == '#'){
	  lsy = ly;
	  lsx = lx;
	}
	if(rsy < 0 || h-1 < rsy)rsy = ry;
	if(rsx < 0 || w-1 < rsx)rsx = rx;
	if(room[1][rsy][rsx] == '#'){
	  rsy = ry;
	  rsx = rx;
	}

	if( (room[0][lsy][lsx] == '%') != (room[1][rsy][rsx] == '%') )continue;
	if(visit[lsy][lsx][rsy][rsx])continue;
	visit[lsy][lsx][rsy][rsx] = true;

	q.push(P2(P(lsy,lsx),P(rsy,rsx)));
      }
    }

    if(visit[ay[0]][ax[0]][ay[1]][ax[1]])cout << "Yes\n";
    else cout << "No\n";
  }
}