#include <iostream>
#include <sstream>
#include <fstream>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
#include <numeric>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <cmath>
using namespace std;

const int size = 51;
int n, m;
bool OL[size][size];
bool OR[size][size];

typedef vector <string> VS;

void init() {
    for ( int i = 0; i < size; i++ ) {
        for ( int j = 0; j < size; j++ ) {
            OL[i][j] = false;
            OR[i][j] = false;
        }
    }
}

/*
. : ©RÉÚ®Å«éZ
# : ÇÌ éZiiüÅ«È¢j
% : ÚIn
R : Rin ÌúÊu
L : Len ÌúÊu
*/

typedef pair <int, int> PII;
typedef pair <PII, PII> Node;
typedef queue <Node> Queue;

int srL, scL, srR, scR;
int grL, gcL, grR, gcR;
const int dr[4] = { 0, 0, 1, -1 };
const int dc[4] = { 1, -1, 0, 0 };
bool used[size][size][size][size];

bool bad( int r, int c ) {
    return r < 0 || r >= m || c < 0 || c >= n;
}

bool solve() {
    Queue Q;
    Node start( PII( srL, scL ), PII( srR, scR ) );
    Q.push( start );

    for ( int i = 0; i < m; i++ ) {
        for ( int j = 0; j < n; j++ ) {
            for ( int k = 0; k < m; k++ ) {
                for ( int l = 0; l < n; l++ ) {
                    used[i][j][k][l] = false;
                }
            }
        }
    }

    while ( !Q.empty() ) {
        Node node = Q.front();
        Q.pop();

        int rL = node.first.first;
        int cL = node.first.second;
        int rR = node.second.first;
        int cR = node.second.second;

        bool flagL = rL == grL && cL == gcL;
        bool flagR = rR == grR && cR == gcR;
        if ( flagL && flagR ) {
            return true;
        }
        else if ( flagL || flagR ) {
            continue;
        }

        for ( int k = 0; k < 4; k++ ) {
            int nrL = rL + dr[k];
            int ncL = cL + dc[k];
            int nrR = rR + dr[k];
            int ncR = cR - dc[k];

            if ( bad( nrL, ncL ) || OL[nrL][ncL] ) {
                nrL = rL;
                ncL = cL;
            }
            if ( bad( nrR, ncR ) || OR[nrR][ncR] ) {
                nrR = rR;
                ncR = cR;
            }

            if ( used[nrL][ncL][nrR][ncR] ) continue;
            used[nrL][ncL][nrR][ncR] = true;
            Node next_node( PII( nrL, ncL ), PII( nrR, ncR ) );
            Q.push( next_node );
        }
    }

    return false;
}

int main() {
    while ( cin >> n >> m ) {
        if ( n == 0 && m == 0 ) break;

        init();

        VS inputL(m), inputR(m);
        for ( int i = 0; i < m; i++ ) {
            cin >> inputL[i] >> inputR[i];
        }

        for ( int i = 0; i < m; i++ ) {
            for ( int j = 0; j < n; j++ ) {
                if ( inputL[i][j] == '#' ) OL[i][j] = true;
                if ( inputR[i][j] == '#' ) OR[i][j] = true;
            }
        }

        for ( int i = 0; i < m; i++ ) {
            for ( int j = 0; j < n; j++ ) {
                if ( inputL[i][j] == 'L' ) {
                    srL = i;
                    scL = j;
                }
                if ( inputR[i][j] == 'R' ) {
                    srR = i;
                    scR = j;
                }
                if ( inputL[i][j] == '%' ) {
                    grL = i;
                    gcL = j;
                }
                if ( inputR[i][j] == '%' ) {
                    grR = i;
                    gcR = j;
                }
            }
        }

        cout << ( solve() ? "Yes" : "No" ) << endl;
    }
    return 0;
}

Measured memory_bytes: 0