#include <bits/stdc++.h>
template<typename T>
struct Edge {
    int from, to;
    T cost;
    Edge(int from, int to, T cost) {
        this->from = from;
        this->to = to;
        this->cost = cost;
    }
};
bool operator == (Edge<int> e1, Edge<int> e2) {
    return e1.from == e2.from &&
            e1.to == e2.to &&
            e1.cost == e2.cost;
}
bool operator > (Edge<int> e1, Edge<int> e2) {
    return e1.cost < e2.cost;
}
template<typename T>
using Edges = std::vector<Edge<T>>;
template<typename T>
using Graph = std::vector<Edges<T>>;
template <typename T>
std::vector<T> dijkstra(const Graph<T> &g, int s) {
    int sz = (int)(g.size());
    std::vector<T> dist(sz, -1);
    std::priority_queue<std::pair<T, int>, std::vector<std::pair<T, int>>, std::greater<std::pair<T, int>>> pq;
    dist[s] = 0;
    pq.push({0, s});
    while(!pq.empty()) {
        T d = pq.top().first;
        int now = pq.top().second;
        pq.pop();
        if(dist[now] == -1 || d > dist[now]) continue;
        for(int i=0;i<(int)(g[now].size());++i) {
            int next = g[now][i].to;
            T cost = g[now][i].cost;
            if(dist[next] == -1 || dist[next] > dist[now] + cost) {
                dist[next] = dist[now] + cost;
                pq.push({cost, next});
            }
        }
    }
    return dist;
}
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
const double eps = 1e-10;
const ll MOD = 1000000007;
const int INF = 1000000000;
const ll LINF = 1ll<<50;
template<typename T>
void printv(const vector<T>& s) {
  for(int i=0;i<(int)(s.size());++i) {
    cout << s[i];
    if(i == (int)(s.size())-1) cout << endl;
    else cout << " ";
  }
}
template<typename T1, typename T2>
ostream& operator<<(ostream &os, const pair<T1, T2> p) {
  os << p.first << ":" << p.second;
  return os;
}
void solve(int w, int h) {
  vector<string> sl(h), sr(h);
  int st = 0, ed = 0;
  for(int i=0;i<h;++i) {
    cin >> sl[i] >> sr[i];
    reverse(sl[i].begin(), sl[i].end());
    for(int j=0;j<w;++j) {
      if(sl[i][j] == 'L') st += i*w*h*w + j*h*w;
      if(sr[i][j] == 'R') st += i*w + j;
    }
  }
  vi dr = {-1, 1, 0, 0}, dc = {0, 0, -1, 1};
  queue<P> que;
  map<P, bool> sel;
  que.push({st / (h*w), st % (h*w)});
  sel[{st / (h*w), st % (h*w)}] = true;
  bool ok = false;
  while(!que.empty()) {
    if(ok) break;
    P now = que.front(); que.pop();
    int i = now.first / w, j = now.first % w;
    int k = now.second / w, l = now.second % w;
    for(int p=0;p<4;++p) {
      int ni = i + dr[p], nj = j + dc[p], nk = k + dr[p], nl = l + dc[p];
      if(!(0 <= ni && ni < h && 0 <= nj && nj < w) || sl[ni][nj] == '#') {
        ni -= dr[p];
        nj -= dc[p];
      }
      if(!(0 <= nk && nk < h && 0 <= nl && nl < w) || sr[nk][nl] == '#') {
        nk -= dr[p];
        nl -= dc[p];
      }
      if(sel[{ni * w + nj, nk * w + nl}]) continue;
      sel[{ni * w + nj, nk * w + nl}] = true;
      if((sl[ni][nj] == '%' || sr[nk][nl] == '%') && !(sl[ni][nj] == '%' && sr[nk][nl] == '%')) {
        continue;
      }
      if(sl[ni][nj] == '%' && sr[nk][nl] == '%') {
        ok = true;
        break;
      }
      que.push({ni * w + nj, nk * w + nl});
    }
  }
  if(ok) cout << "Yes" << endl;
  else cout << "No" << endl;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  while(1) {
    int w, h; cin >> w >> h;
    if(w == 0) break;
    solve(w, h);
  }
}



Measured memory_bytes: 108572