#include <iostream>
#include <vector>
#include <utility>
#include <stack>
#include <tuple>
using namespace std;

bool visited[51][51][51][51];
int h, w;
vector<string> L(50), R(50);
pair<int,int> gl, gr;

bool in_range(int a, int b){
  return a >= 0 && a < b;
}

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

void rec(pair<int,int> &l, pair<int,int> &r){
  stack<pair<pair<int,int>,pair<int,int>>> st;
  st.emplace(l,r);
  while(st.size()){
    tie(l,r) = st.top();
    st.pop();
    for(int i = 0; i < 4; ++i){
      pair<int,int> l_ = l, r_ = r;
      l_.first += dx[i], l_.second += dy[i];
      r_.first += dx[i], r_.second -= dy[i];

      if(!(in_range(l_.first,h) and in_range(l_.second,w)))
        l_ = l;
      if(!(in_range(r_.first,h) and in_range(r_.second,w)))
        r_ = r;

      if(L[l_.first][l_.second] == '#') l_ = l;
      if(R[r_.first][r_.second] == '#') r_ = r;

      if(visited[l_.first][l_.second][r_.first][r_.second]) continue;
      visited[l_.first][l_.second][r_.first][r_.second] = true;
      if(gl == l_ or gr == r_) continue;
      if(visited[gl.first][gl.second][gr.first][gr.second]) return;
      // rec(l_,r_);
      st.emplace(l_,r_);
    }
  }
}

int main(){
  while(cin >> w >> h, h&&w){
    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){
            visited[i][j][k][l] = false;
          }
        }
      }
    }
    for(int i = 0; i < h; ++i) cin >> L[i] >> R[i];
    pair<int,int> sl, sr;
    for(int i = 0; i < h; ++i){
      for(int j = 0; j < w; ++j){
        if(L[i][j] == '%') gl = {i,j};
        if(R[i][j] == '%') gr = {i,j};
        if(L[i][j] == 'L') sl = {i,j};
        if(R[i][j] == 'R') sr = {i,j};
      }
    }
    // cerr << sl.first << " " << sl.second << " " << sr.first << " " << sr.second << endl;
    // cerr << gl.first << " " << gl.second << " " << gr.first << " " << gr.second << endl;
    visited[sl.first][sl.second][sr.first][sr.second] = true;
    rec(sl,sr);
    if(visited[gl.first][gl.second][gr.first][gr.second]){
      puts("Yes");
    }else{
      puts("No");
    }
  }
}

