
S = input()

for i in range(len(S)):
    # 0オリジン[偶数]
    if i % 2 == 0:
        if S[i] not in ['R', 'U', 'D']:
            print("No")
            exit()
    else:
        if S[i] not in ['L', 'U', 'D']:
            print("No")
            exit()
print("Yes") S = input() S input() input for i in range(len(S)):
    # 0オリジン[偶数]
    if i % 2 == 0:
        if S[i] not in ['R', 'U', 'D']:
            print("No")
            exit()
    else:
        if S[i] not in ['L', 'U', 'D']:
            print("No")
            exit() i range(len(S)) range len(S) len S if i % 2 == 0:
        if S[i] not in ['R', 'U', 'D']:
            print("No")
            exit()
    else:
        if S[i] not in ['L', 'U', 'D']:
            print("No")
            exit() i % 2 == 0 i % 2 i 2 0 if S[i] not in ['R', 'U', 'D']:
            print("No")
            exit()
     S[i] not in ['R', 'U', 'D'] S[i] S i ['R', 'U', 'D'] 'R' 'U' 'D' print("No") print "No" exit() exit if S[i] not in ['L', 'U', 'D']:
            print("No")
            exit() S[i] not in ['L', 'U', 'D'] S[i] S i ['L', 'U', 'D'] 'L' 'U' 'D' print("No") print "No" exit() exit print("Yes") print "Yes" S = input() input() S

S = input()

for i in range(len(S)):
    # 0オリジン[偶数]
    if i % 2 == 0:
        if S[i] not in ['R', 'U', 'D']:
            print("No")
            exit()
    else:
        if S[i] not in ['L', 'U', 'D']:
            print("No")
            exit()
print("Yes")