from sys import stdin

s = list(stdin.readline().rstrip())

ans = True

odd = ['R', 'U', 'D']
even = ['L', 'U', 'D']

for i, t in enumerate(s):
    if (i+1)%2 == 1:
        if not t in odd:
            ans = False
    else:
        if not t in even:
            ans = False

if ans:
    print('Yes')
else:
    print('No') from sys import stdin s = list(stdin.readline().rstrip()) s list(stdin.readline().rstrip()) list stdin.readline().rstrip() stdin.readline().rstrip stdin.readline() stdin.readline stdin readline rstrip ans = True ans True odd = ['R', 'U', 'D'] odd ['R', 'U', 'D'] 'R' 'U' 'D' even = ['L', 'U', 'D'] even ['L', 'U', 'D'] 'L' 'U' 'D' for i, t in enumerate(s):
    if (i+1)%2 == 1:
        if not t in odd:
            ans = False
    else:
        if not t in even:
            ans = False i t enumerate(s) enumerate s if (i+1)%2 == 1:
        if not t in odd:
            ans = False
    else:
        if not t in even:
            ans = False (i+1)%2 == 1 (i+1)%2 i+1 i 1 2 1 if not t in odd:
            ans = False
     not t in odd t in odd t odd ans = False ans False if not t in even:
            ans = False not t in even t in even t even ans = False ans False if ans:
    print('Yes')
else:
    print('No') ans print('Yes') print 'Yes' print('No') print 'No' odd = ['R', 'U', 'D'] ['R', 'U', 'D'] odd even = ['L', 'U', 'D'] ['L', 'U', 'D'] even ans = False False ans s = list(stdin.readline().rstrip()) list(stdin.readline().rstrip()) s ans = True True ans ans = False False ans
from sys import stdin

s = list(stdin.readline().rstrip())

ans = True

odd = ['R', 'U', 'D']
even = ['L', 'U', 'D']

for i, t in enumerate(s):
    if (i+1)%2 == 1:
        if not t in odd:
            ans = False
    else:
        if not t in even:
            ans = False

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