l = list(input())
f = False

for i in range(len(l)):
    if i % 2:
        if l[i] == 'L' or l[i] == 'U' or l[i] == 'D':
            f = True
        else:
            f = False
            break
    else:
        if l[i] == 'R' or l[i] == 'U' or l[i] == 'D':
            f = True
        else:
            f = False
            break

if f:
    print('Yes')
else:
    print('No') l = list(input()) l list(input()) list input() input f = False f False for i in range(len(l)):
    if i % 2:
        if l[i] == 'L' or l[i] == 'U' or l[i] == 'D':
            f = True
        else:
            f = False
            break
    else:
        if l[i] == 'R' or l[i] == 'U' or l[i] == 'D':
            f = True
        else:
            f = False
            break i range(len(l)) range len(l) len l if i % 2:
        if l[i] == 'L' or l[i] == 'U' or l[i] == 'D':
            f = True
        else:
            f = False
            break
    else:
        if l[i] == 'R' or l[i] == 'U' or l[i] == 'D':
            f = True
        else:
            f = False
            break i % 2 i 2 if l[i] == 'L' or l[i] == 'U' or l[i] == 'D':
            f = True
        else:
            f = False
            break
     l[i] == 'L' or l[i] == 'U' or l[i] == 'D' l[i] == 'L' or l[i] == 'U' l[i] == 'L' l[i] l i 'L' l[i] == 'U' l[i] l i 'U' l[i] == 'D' l[i] l i 'D' f = True f True f = False f False break if l[i] == 'R' or l[i] == 'U' or l[i] == 'D':
            f = True
        else:
            f = False
            break l[i] == 'R' or l[i] == 'U' or l[i] == 'D' l[i] == 'R' or l[i] == 'U' l[i] == 'R' l[i] l i 'R' l[i] == 'U' l[i] l i 'U' l[i] == 'D' l[i] l i 'D' f = True f True f = False f False break if f:
    print('Yes')
else:
    print('No') f print('Yes') print 'Yes' print('No') print 'No' f = True True f f = True True f f = False False f f = False False f l = list(input()) list(input()) l f = False False f
l = list(input())
f = False

for i in range(len(l)):
    if i % 2:
        if l[i] == 'L' or l[i] == 'U' or l[i] == 'D':
            f = True
        else:
            f = False
            break
    else:
        if l[i] == 'R' or l[i] == 'U' or l[i] == 'D':
            f = True
        else:
            f = False
            break

if f:
    print('Yes')
else:
    print('No')