#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <ctime>
#include <cassert>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <numeric>
#include <list>
#include <iomanip>


using namespace std;

#ifdef _MSC_VER
#define __typeof__ decltype
template <class T> int popcount(T n) { return n ? 1 + popcount(n & (n - 1)) : 0; }
#endif
#ifdef __GNUC__
template <class T> int popcount(T n);
template <> int popcount(unsigned int n) { return n ? __builtin_popcount(n) : 0; }
template <> int popcount(int n) { return n ? __builtin_popcount(n) : 0; }
template <> int popcount(unsigned long long n) { return n ? __builtin_popcountll(n) : 0; }
template <> int popcount(long long n) { return n ? __builtin_popcountll(n) : 0; }
#endif

#define foreach(it, c) for (__typeof__((c).begin()) it=(c).begin(); it != (c).end(); ++it)
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define CL(arr, val) memset(arr, val, sizeof(arr))

#define rep(i, n) for (int i = 0; i < n; ++i)

template <class T> void max_swap(T& a, const T& b) { a = max(a, b); }
template <class T> void min_swap(T& a, const T& b) { a = min(a, b); }

typedef long long ll;
typedef pair<int, int> pint;

const double EPS = 1e-8;
const double PI = acos(-1.0);
const int dx[] = { 0, 1, 0, -1 };
const int dy[] = { 1, 0, -1, 0 };
bool valid_pos(int x, int y, int w, int h) { return 0 <= x && x < w && 0 <= y && y < h; }

template <class T> void print(T a, int n, int br = 1, const string& deli = ", ") { cout << "{ "; for (int i = 0; i < n; ++i) { cout << a[i]; if (i + 1 != n) cout << deli; } cout << " }"; while (br--) cout << endl; }
template <class T> void print(const vector<T>& v, int br = 1, const string& deli = ", ") { print(v, v.size(), br, deli); }


int w, h;
char l[64][64], r[64][64];
bool solve()
{
	int lx, ly, rx, ry;
	for (int y = 0; y < h; ++y)
	{
		for (int x = 0; x < w; ++x)
		{
			if (l[y][x] == 'L')
				lx = x, ly = y;
			if (r[y][x] == 'R')
				rx = x, ry = y;
		}
	}

	static bool visit[64][64][64][64];
	CL(visit, 0);

	typedef pair<pint, pint> P;
	queue<P> q;
	visit[ly][lx][ry][rx] = true;
	q.push(P(pint(lx, ly), pint(rx, ry)));
	while (!q.empty())
	{
		P t = q.front(); q.pop();
		int lx = t.first.first, ly = t.first.second;
		int rx = t.second.first, ry = t.second.second;

		for (int i = 0; i < 4; ++i)
		{
			int nx, ny, mx, my;
			int x = dx[i], y = dy[i];

			nx = lx + x, ny = ly + y;
			if (!valid_pos(nx, ny, w, h) || l[ny][nx] == '#')
				nx = lx, ny = ly;

			if (i == 1 || i == 3)
				x *= -1;
			mx = rx + x, my = ry + y;
			if (!valid_pos(mx, my, w, h) || r[my][mx] == '#')
				mx = rx, my = ry;

			if (valid_pos(nx, ny, w, h) && valid_pos(mx, my, w, h)
				&& !visit[ny][nx][my][mx])
			{
				visit[ny][nx][my][mx] = true;
				if (l[ny][nx] == '%' && r[my][mx] == '%')
					return true;
				else if (l[ny][nx] != '%' && r[my][mx] != '%')
					q.push(P(pint(nx, ny), pint(mx, my)));
			}
		}
	}
	return false;
}
int main()
{
	while (scanf("%d%d", &w, &h), w)
	{
		for (int i = 0; i < h; ++i)
			scanf("%s%s", l[i], r[i]);
		puts(solve() ? "Yes" : "No");
	}
}

Measured memory_bytes: 17000