s = list(input())
odd = set(s[::2])
even = set(s[1::2])
if 'L' in odd or 'R' in even:
    print("No")
else:
    print('Yes') s = list(input()) s list(input()) list input() input odd = set(s[::2]) odd set(s[::2]) set s[::2] s ::2 2 even = set(s[1::2]) even set(s[1::2]) set s[1::2] s 1::2 1 2 if 'L' in odd or 'R' in even:
    print("No")
else:
    print('Yes') 'L' in odd or 'R' in even 'L' in odd 'L' odd 'R' in even 'R' even print("No") print "No" print('Yes') print 'Yes' even = set(s[1::2]) set(s[1::2]) even s = list(input()) list(input()) s odd = set(s[::2]) set(s[::2]) odd
s = list(input())
odd = set(s[::2])
even = set(s[1::2])
if 'L' in odd or 'R' in even:
    print("No")
else:
    print('Yes')
