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

using namespace std;

const int N = 50;

class State{
public:
  int ly, lx, ry, rx;
};

int h, w;

bool visited[N][N][N][N];
char data[2][N][N];
int dx[] = {0, 1, 0, -1};
int dy[] = {-1, 0, 1, 0};

bool bfs(int sly, int slx, int sry, int srx){
  State u, v;
  u.ly = sly;
  u.lx = slx;
  u.ry = sry;
  u.rx = srx;
  queue<State> Q;
  Q.push(u);
  while(!Q.empty()){
    u = Q.front(); Q.pop();
  //cout << ly << ' ' << lx << ' ' << ry << ' ' << rx << endl;
    if(data[0][u.ly][u.lx] == '%' && data[1][u.ry][u.rx] == '%') return true;
    else if(data[0][u.ly][u.lx] == '%' || data[1][u.ry][u.rx] == '%') continue;
    for(int i=0;i<4;i++){
      int lty = u.ly + dy[i];
      int ltx = u.lx + dx[i];
      int rty = u.ry + dy[i];
      int rtx = u.rx - dx[i];
      //cout << "       " << lty << ' ' << ltx << ' ' << rty << ' ' << rtx << endl;
      if(lty<0 || lty>=h){
	lty = u.ly;
	ltx = u.lx;
      }
      if(ltx<0 || ltx>=w){
	lty = u.ly;
	ltx = u.lx;
      }
      if(rty<0 || rty>=h){
	rty = u.ry;
	rtx = u.rx;
      }
      if(rtx<0 || rtx>=w){
	rty = u.ry;
	rtx = u.rx;
      }
      if(data[0][lty][ltx] == '#'){
	lty = u.ly;
	ltx = u.lx;
      }
      if(data[1][rty][rtx] == '#'){
	rty = u.ry;
	rtx = u.rx;
      }
      if(visited[lty][ltx][rty][rtx]) continue;
      visited[lty][ltx][rty][rtx] = true;
      v.ly = lty;
      v.lx = ltx;
      v.ry = rty;
      v.rx = rtx;
      Q.push(v);
    }
  }
  return false;
}

int main(){
  int slx, sly, srx, sry;
  while(cin >> w >> h){
    if(h == 0 && w == 0) break;
    fill(visited[0][0][0], visited[N][0][0], false);
    for(int i=0;i<h;i++){
      for(int k=0;k<2;k++){
	for(int j=0;j<w;j++){
	  cin >> data[k][i][j];
	  if(data[k][i][j] == 'L'){
	    slx = j;
	    sly = i;
	    data[k][i][j] = '.';
	  }else if(data[k][i][j] == 'R'){
	    srx = j;
	    sry = i;
	    data[k][i][j] = '.';
	  }
	}
      }
    }
    if(bfs(sly, slx, sry, srx)) cout << "Yes" << endl;
    else cout << "No" << endl;
  }
  return 0;
}