S = input()

gu = ['R', 'U', 'D']
ki = ['L', 'U', 'D']
flag = True
for i, s in enumerate(S):
    if i%2==0:
        if s in gu:
            pass
        else:
            flag = False
            break
    else:
        if s in ki:
            pass
        else:
            flag = False
            break

if flag:
    print('Yes')
else:
    print("No") S = input() S input() input gu = ['R', 'U', 'D'] gu ['R', 'U', 'D'] 'R' 'U' 'D' ki = ['L', 'U', 'D'] ki ['L', 'U', 'D'] 'L' 'U' 'D' flag = True flag True for i, s in enumerate(S):
    if i%2==0:
        if s in gu:
            pass
        else:
            flag = False
            break
    else:
        if s in ki:
            pass
        else:
            flag = False
            break i s enumerate(S) enumerate S if i%2==0:
        if s in gu:
            pass
        else:
            flag = False
            break
    else:
        if s in ki:
            pass
        else:
            flag = False
            break i%2==0 i%2 i 2 0 if s in gu:
            pass
        else:
            flag = False
            break
     s in gu s gu flag = False flag False break if s in ki:
            pass
        else:
            flag = False
            break s in ki s ki flag = False flag False break if flag:
    print('Yes')
else:
    print("No") flag print('Yes') print 'Yes' print("No") print "No" flag = False False flag S = input() input() S flag = False False flag ki = ['L', 'U', 'D'] ['L', 'U', 'D'] ki flag = True True flag gu = ['R', 'U', 'D'] ['R', 'U', 'D'] gu
S = input()

gu = ['R', 'U', 'D']
ki = ['L', 'U', 'D']
flag = True
for i, s in enumerate(S):
    if i%2==0:
        if s in gu:
            pass
        else:
            flag = False
            break
    else:
        if s in ki:
            pass
        else:
            flag = False
            break

if flag:
    print('Yes')
else:
    print("No")
