S = input()
flag = 0
for i in range(1,len(S)+1):
    if i%2 == 1:
        if S[i-1] in 'RUD':
            continue
        else:
            flag =1
            print("No")
            break
    else:
        if S[i-1] in 'LUD':
            continue
        else:
            flag = 1
            print("No")
            break
if flag == 0:
    print("Yes") S = input() S input() input flag = 0 flag 0 for i in range(1,len(S)+1):
    if i%2 == 1:
        if S[i-1] in 'RUD':
            continue
        else:
            flag =1
            print("No")
            break
    else:
        if S[i-1] in 'LUD':
            continue
        else:
            flag = 1
            print("No")
            break i range(1,len(S)+1) range 1 len(S)+1 len(S) len S 1 if i%2 == 1:
        if S[i-1] in 'RUD':
            continue
        else:
            flag =1
            print("No")
            break
    else:
        if S[i-1] in 'LUD':
            continue
        else:
            flag = 1
            print("No")
            break i%2 == 1 i%2 i 2 1 if S[i-1] in 'RUD':
            continue
        else:
            flag =1
            print("No")
            break
     S[i-1] in 'RUD' S[i-1] S i-1 i 1 'RUD' continue flag =1 flag 1 print("No") print "No" break if S[i-1] in 'LUD':
            continue
        else:
            flag = 1
            print("No")
            break S[i-1] in 'LUD' S[i-1] S i-1 i 1 'LUD' continue flag = 1 flag 1 print("No") print "No" break if flag == 0:
    print("Yes") flag == 0 flag 0 print("Yes") print "Yes" flag = 1 1 flag flag = 0 0 flag S = input() input() S flag =1 1 flag
S = input()
flag = 0
for i in range(1,len(S)+1):
    if i%2 == 1:
        if S[i-1] in 'RUD':
            continue
        else:
            flag =1
            print("No")
            break
    else:
        if S[i-1] in 'LUD':
            continue
        else:
            flag = 1
            print("No")
            break
if flag == 0:
    print("Yes")