using System;
using System.Collections.Generic;
using System.Linq;

namespace V2153{
    public class Program{
        public static void Main(string[] args){
            var sr = new StreamReader();
            //---------------------------------
            var dx = new[]{0, 1, 0, -1};
            var dy = new[]{1, 0, -1, 0};

            while(true){
                var W = sr.Next<int>();
                var H = sr.Next<int>();
                var C = sr.Next<string>(H * 2);
                if(W == 0 && H == 0) break;

                var lc = C.Where((_, i) => i % 2 == 0).ToArray();
                var rc = C.Where((_, i) => i % 2 == 1).Select(s => new string(s.Reverse().ToArray())).ToArray();

                var que = new Queue<int>();

                var glx = 0;
                var gly = 0;
                for(var i = 0; i < H; i++){
                    for(var j = 0; j < W; j++){
                        if(lc[i][j] == '%'){
                            glx = j;
                            gly = i;
                        }
                        if(lc[i][j] == 'L'){
                            que.Enqueue(j);
                            que.Enqueue(i);
                        }
                    }
                }

                var grx = 0;
                var gry = 0;
                for(var i = 0; i < H; i++){
                    for(var j = 0; j < W; j++){
                        if(rc[i][j] == '%'){
                            grx = j;
                            gry = i;
                        }
                        if(rc[i][j] == 'R'){
                            que.Enqueue(j);
                            que.Enqueue(i);
                        }
                    }
                }

                Func<int, int, bool> isInside = (x, y) => 0 <= x && x < W && 0 <= y && y < H;
                var dist = new bool[W, H, W, H];//lx, ly, rx, ry

                while(que.Count > 0){
                    var lx = que.Dequeue();
                    var ly = que.Dequeue();
                    var rx = que.Dequeue();
                    var ry = que.Dequeue();

                    for(var i = 0; i < 4; i++){
                        var nlx = lx + dx[i];
                        var nly = ly + dy[i];
                        var nrx = rx + dx[i];
                        var nry = ry + dy[i];

                        if(!isInside(nlx, nly) || lc[nly][nlx] == '#'){
                            nlx = lx;
                            nly = ly;
                        }
                        if(!isInside(nrx, nry) || rc[nry][nrx] == '#'){
                            nrx = rx;
                            nry = ry;
                        }

                        if(!dist[nlx, nly, nrx, nry] && !((nlx == glx && nly == gly) ^ (nrx == grx && nry == gry))){
                            dist[nlx, nly, nrx, nry] = true;
                            que.Enqueue(nlx);
                            que.Enqueue(nly);
                            que.Enqueue(nrx);
                            que.Enqueue(nry);
                        }
                    }
                }

                Console.WriteLine(dist[glx, gly, grx, gry] ? "Yes" : "No");
            }
            //---------------------------------
        }
    }

    public class StreamReader{
        private readonly char[] _c = {' '};
        private int _index = -1;
        private string[] _input = new string[0];
        private readonly System.IO.StreamReader _sr = new System.IO.StreamReader(Console.OpenStandardInput());

        public T Next<T>(){
            if(_index == _input.Length - 1){
                _index = -1;
                while(true){
                    string rl = _sr.ReadLine();
                    if(rl == null){
                        if(typeof(T).IsClass) return default(T);
                        return (T)typeof(T).GetField("MinValue").GetValue(null);
                    }
                    if(rl != ""){
                        _input = rl.Split(_c, StringSplitOptions.RemoveEmptyEntries);
                        break;
                    }
                }
            }
            return (T)Convert.ChangeType(_input[++_index], typeof(T), System.Globalization.CultureInfo.InvariantCulture);
        }

        public T[] Next<T>(int x){
            var ret = new T[x];
            for(var i = 0; i < x; ++i) ret[i] = Next<T>();
            return ret;
        }

        public T[][] Next<T>(int y, int x){
            var ret = new T[y][];
            for(var i = 0; i < y; ++i) ret[i] = Next<T>(x);
            return ret;
        }
    }
}

Measured memory_bytes: 28272