#include<iostream>
#include<iomanip>
#include<string>
#include<cstring>
#include<vector>
#include<set>
#include<queue>
#include<cmath>
using namespace std;
typedef vector<int> vi;
const int inf=1e9;
int w,h;
int ldx[]={-1,0,1,0};
int ldy[]={0,1,0,-1};
int rdx[]={1,0,-1,0};
int rdy[]={0,1,0,-1};
bool vis[55][55][55][55];
string rin[55];
string len[55];
bool treasure;
int rinsx,rinsy,ringx,ringy,lensx,lensy,lengx,lengy;
struct P
{
  int ly,lx,ry,rx;
  P(int ly,int lx,int ry,int rx):ly(ly),lx(lx),ry(ry),rx(rx){};
};
void bfs(int lx,int ly,int rx,int ry)
{
  vis[ly][lx][ry][rx]=true;
  // lenvis[ly][lx]=true;
  //rinvis[ry][rx]=true;
  queue<P> q;
  q.push(P(ly,lx,ry,rx));
  while(!q.empty())
    {
      P now=q.front();q.pop();
      int lennx,lenny,rinnx,rinny;
      bool lengoal=false;
      bool ringoal=false;
      for(int k=0;k<4;k++)
	{
	  lennx=now.lx+ldx[k];
	  lenny=now.ly+ldy[k];
	  rinnx=now.rx+rdx[k];
	  rinny=now.ry+rdy[k];
	  if(lennx>=w || lennx<0 || lenny>=h || lenny<0 || len[lenny][lennx]=='#')
	    {
	      lennx=now.lx;
	      lenny=now.ly;
	    }
	  if(rinnx>=w || rinnx<0 || rinny>=h || rinny<0 || rin[rinny][rinnx]=='#')
	    {
	      rinnx=now.rx;
	      rinny=now.ry;
	    }
	  if(vis[lenny][lennx][rinny][rinnx])continue;
	  if(len[lenny][lennx]=='%') lengoal=true;
	  else lengoal=false;
	  if(rin[rinny][rinnx]=='%') ringoal=true;
	  else ringoal=false;
	  if(lengoal && ringoal)
	    {
	      treasure=true;
	      return;
	    }
	  if((lengoal ||ringoal) && !(lengoal && ringoal)) continue;
	  q.push(P(lenny,lennx,rinny,rinnx));
	  vis[lenny][lennx][rinny][rinnx]=true;
	}
    }
}

int main()
{
  while(cin >> w >> h && w)
    {
      treasure=false;
      memset(vis,false,sizeof(vis));
      //memset(lenvis,false,sizeof(lenvis));
      //memset(rinvis,false,sizeof(rinvis));
      for(int i=0;i<h;i++)
	{
	  cin >> len[i] >> rin[i];
	}
      for(int i=0;i<h;i++)
	{
	  for(int j=0;j<w;j++)
	    {
	      if(len[i][j]=='L')
		{
		  lensy=i;
		  lensx=j;
		}
	      if(rin[i][j]=='R')
		{
		  rinsy=i;
		  rinsx=j;
		}
	    }
	}
      bfs(lensx,lensy,rinsx,rinsy);
      if(treasure)
	{
	  cout << "Yes" << endl;
	}
      else
	{
	  cout << "No" << endl;
	}
    }
}

