#include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<map>
#include<set>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<sstream>
#include<numeric>

#define f first
#define s second
#define mp make_pair

#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define FOR(i,c) for(__typeof((c).begin()) i=(c).begin(); i!=(c).end(); i++)
#define ALL(c) (c).begin(), (c).end()

using namespace std;

typedef unsigned int uint;
typedef long long ll;

char ba[64][64];
char bb[64][64];

#define IN(x,s,g) ((x) >= (s) && (x) < (g))

bool memo[64][64][64][64];

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

int main(){
  int w,h;
  while(scanf("%d%d",&w,&h), w+h){
    int lsx, lsy, rsx, rsy;
    int lgx, lgy, rgx, rgy;
    memset(memo, 0, sizeof(memo));
    REP(i,h) scanf("%s %s",ba[i],bb[i]);
    REP(i,h) REP(j,w){
      if(ba[i][j] == 'L'){
        lsx = j; lsy = i;
        ba[i][j] = '.';
      }else if(ba[i][j] == '%'){
        lgx = j; lgy = i;
        ba[i][j] = '.';
      }
      if(bb[i][j] == 'R'){
        rsx = j; rsy = i;
        bb[i][j] = '.';
      }else if(bb[i][j] == '%'){
        rgx = j; rgy = i;
        bb[i][j] = '.';
      }
    }

    //REP(i,h) printf("%s %s\n",ba[i],bb[i]);

    typedef pair<pair<int,int>, pair<int,int> > P;
    queue<P> q;
    bool ans = false;
    q.push(mp(mp(lsx,lsy),mp(rsx,rsy)));
    while(!q.empty()){
      P p = q.front();
      int lx = p.f.f;
      int ly = p.f.s;
      int rx = p.s.f;
      int ry = p.s.s;

      //printf("(%d,%d) , (%d,%d)\n",lx,ly,rx,ry);
      q.pop();

      if(memo[lx][ly][rx][ry])
        continue;
      memo[lx][ly][rx][ry] = true;

      if(lx == lgx && ly == lgy){
        if(rx == rgx && ry == rgy){
          ans = true;
          break;
        }else{
          continue;
        }
      }
      if(rx == rgx && ry == rgy)
        continue;

      REP(i,4){
        int lxx = lx + dx[i];
        int lyy = ly + dy[i];
        int rxx = rx - dx[i];
        int ryy = ry + dy[i];

        if( ! (IN(lxx,0,w) && IN(lyy,0,h)) ){
          lxx = lx; lyy = ly;
        } else if(ba[lyy][lxx] == '#'){
          lxx = lx; lyy = ly;
        }

        if( ! (IN(rxx,0,w) && IN(ryy,0,h)) ){
          rxx = rx; ryy = ry;
        } else if(bb[ryy][rxx] == '#'){
          rxx = rx; ryy = ry;
        }

        if(!memo[lxx][lyy][rxx][ryy]){
          q.push(mp(mp(lxx,lyy),mp(rxx,ryy)));
        }
      }
    }
    puts(ans?"Yes":"No");
  }
  return 0;
}