#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <iostream>
#include <math.h>
#include <assert.h>
#include <vector>
#include <queue>

using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
static const double EPS = 1e-9;
static const double PI = acos(-1.0);

#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, s, n) for (int i = (s); i < (int)(n); i++)
#define FOREQ(i, s, n) for (int i = (s); i <= (int)(n); i++)
#define FORIT(it, c) for (__typeof((c).begin())it = (c).begin(); it != (c).end(); it++)
#define MEMSET(v, h) memset((v), h, sizeof(v))

struct Point {
  int x1, y1, x2, y2;
  Point() {;}
  Point(int x1, int y1, int x2, int y2) : x1(x1), y1(y1), x2(x2), y2(y2) {;}
};

int w, h;
bool in(int x, int y) { return x >= 0 && x < w && y >= 0 && y < h; }
  
char field[2][100][100];
bool visit[60][60][60][60];
int dx[4] = { 1, 0, -1, 0 };
int dy[4] = { 0, 1, 0, -1 };

int main() {
  while (scanf("%d %d", &w, &h), w|h) {
    MEMSET(visit, false);
    int sx1, sy1, sx2, sy2;
    REP(y, h) {
      scanf("%s %s", field[0][y], field[1][y]);
      REP(x, w) {
        if (field[0][y][x] == 'L') { sx1 = x; sy1 = y; }
        if (field[1][y][x] == 'R') { sx2 = x; sy2 = y; }
      }
    }
    queue<Point> que;
    que.push(Point(sx1, sy1, sx2, sy2));
    while (!que.empty()) {
      Point p = que.front();
      que.pop();
      REP(dir, 4) {
        int nx1 = p.x1 + dx[dir];
        int ny1 = p.y1 + dy[dir];
        int nx2 = p.x2 - dx[dir];
        int ny2 = p.y2 + dy[dir];
        if (field[0][ny1][nx1] == '#' || !in(nx1, ny1)) { nx1 -= dx[dir]; ny1 -= dy[dir]; }
        if (field[1][ny2][nx2] == '#' || !in(nx2, ny2)) { nx2 += dx[dir]; ny2 -= dy[dir]; }
        if (field[0][ny1][nx1] == '%' && field[1][ny2][nx2] == '%') { 
          puts("Yes");
          goto next;
        }
        if (field[0][ny1][nx1] == '%' || field[1][ny2][nx2] == '%') { 
          continue;
        }
        if (visit[ny1][nx1][ny2][nx2]) { continue; }
        visit[ny1][nx1][ny2][nx2] = true;
        que.push(Point(nx1, ny1, nx2, ny2));
      }
    }
    puts("No");
next:;
  }
}