#include <bits/stdc++.h>
using namespace std;
#define SZ(x) (int)(x.size())
#define REP(i, n) for(int i=0;i<(n);++i)
#define FOR(i, a, b) for(int i=(a);i<(b);++i)
#define RREP(i, n) for(int i=(int)(n)-1;i>=0;--i)
#define RFOR(i, a, b) for(int i=(int)(b)-1;i>=(a);--i)
#define ALL(a) a.begin(),a.end()
#define DUMP(x) cerr<<#x<<" = "<<(x)<<endl
#define DEBUG(x) cerr<<#x<<" = "<<(x)<<" (L"<<__LINE__<<")"<< endl;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using P = pair<int, int>;
const double eps = 1e-8;
const ll MOD = 1000000007;
const int INF = INT_MAX / 2;
const ll LINF = LLONG_MAX / 2;
template <typename T1, typename T2>
bool chmax(T1 &a, const T2 &b) {
    if (a < b) { a = b; return true; }
    return false;
}
template <typename T1, typename T2>
bool chmin(T1 &a, const T2 &b) {
    if (a > b) { a = b; return true; }
    return false;
}
template<typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
    os << "[";
    REP(i, SZ(v)) {
        if (i) os << ", ";
        os << v[i];
    }
    return os << "]";
}
template<typename T1, typename T2>
ostream &operator<<(ostream &os, const map<T1, T2> &mp) {
    os << "{";
    int a = 0;
    for (auto &tp : mp) {
        if (a) os << ", ";
        a = 1;
        os << tp;
    }
    return os << "}";
}
template<typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &p) {
    os << p.first << ":" << p.second;
    return os;
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);

    for (;;) {
        int W, H; cin >> W >> H;
        if (W == 0) break;
        vector<string> L(H), R(H);
        int lsi, lsj, rsi, rsj, lgi, lgj, rgi, rgj;
        REP(i, H) {
            cin >> L[i] >> R[i];
            REP(j, W) {
                if (L[i][j] == 'L') {
                    lsi = i, lsj = j;
                }
                if (L[i][j] == '%') {
                    lgi = i, lgj = j;
                }
                if (R[i][j] == 'R') {
                    rsi = i, rsj = j;
                }
                if (R[i][j] == '%') {
                    rgi = i, rgj = j;
                }
            }
        }

        queue<tuple<int,int,int,int>> que;
        map<tuple<int,int,int,int>,int> used;
        que.emplace(lsi, lsj, rsi, rsj);
        used[que.front()] = 1;

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

        int ans = 0;
        while (!que.empty()) {
            int li, lj, ri, rj;
            tie(li, lj, ri, rj) = que.front(); que.pop();
            int gl = li == lgi and lj == lgj;
            int gr = ri == rgi and rj == rgj;
            if (gl and gr) {
                ans = 1;
                break;
            }
            if (gl or gr) {
                continue;
            }
            REP(k, 4) {
                int nli = li + dy[k];
                int nlj = lj + ldx[k];
                int nri = ri + dy[k];
                int nrj = rj + rdx[k];
                if (nli < 0 or H <= nli or nlj < 0 or W <= nlj or L[nli][nlj] == '#') {
                    nli = li, nlj = lj;
                }
                if (nri < 0 or H <= nri or nrj < 0 or W <= nrj or R[nri][nrj] == '#') {
                    nri = ri, nrj = rj;
                }
                auto tp = make_tuple(nli, nlj, nri, nrj);
                if (used.count(tp) == 0) {
                    used[tp] = 1;
                    que.push(tp);
                }
            }
        }

        cout << (ans ? "Yes" : "No") << endl;
    }

    return 0;
}



Measured memory_bytes: 108904