Problem:
 Score: 200 points    Problem Statement  Takahashi will do a tap dance. The dance is described by a string S where each character is L , R , U , or D . These characters indicate the positions on which Takahashi should step. He will follow these instructions one by one in order, starting with the first character.  S is said to be easily playable if and only if it satisfies both of the following conditions:   Every character in an odd position ( 1 -st, 3 -rd, 5 -th, \ldots ) is R , U , or D .  Every character in an even position ( 2 -nd, 4 -th, 6 -th, \ldots ) is L , U , or D .   Your task is to print Yes if S is easily playable, and No otherwise.      Constraints   S is a string of length between 1 and 100 (inclusive).  Each character of S is L , R , U , or D .         Input  Input is given from Standard Input in the following format:  S       Output  Print Yes if S is easily playable, and No otherwise.        Sample Input 1 RUDLUDR      Sample Output 1 Yes  Every character in an odd position ( 1 -st, 3 -rd, 5 -th, 7 -th) is R , U , or D .  Every character in an even position ( 2 -nd, 4 -th, 6 -th) is L , U , or D .  Thus, S is easily playable.       Sample Input 2 DULL      Sample Output 2 No  The 3 -rd character is not R , U , nor D , so S is not easily playable.       Sample Input 3 UUUUUUUUUUUUUUU      Sample Output 3 Yes       Sample Input 4 ULURU      Sample Output 4 No       Sample Input 5 RDULULDURURLRDULRLR      Sample Output 5 Yes

Solution (Python):
a=input()
b=a[1::2]
c=a[0::2]
if 'L' in c:
    print('No')
elif 'R' in b:
    print('No')
else:
    print('Yes')

Solution (Python):
S = input()

if len(S) % 2 == 1:
    S += "L"

for i in range(0, len(S), 2):
    l = S[i]
    r = S[i + 1]

    if not (l == "R" or l == "U" or l == "D"):
        print("No")
        break

    if not (r == "L" or r == "U" or r == "D"):
        print("No")
        break
else:
    print("Yes")

Solution (Python):
S = list(input())
cnt = 0
for i in range(len(S)) :
    if(i % 2 == 0) :
        if(S[i] == "L") :
            break
        else :
            cnt += 1
    else :
        if(S[i] == "R") :
            break
        else :
            cnt += 1
    
if(cnt == len(S)) :
    print("Yes")
else :
    print("No")

Solution (Python):
input_line = input()

for i in range(len(input_line)):
    if i % 2 ==	1:
     	if input_line[i] == 'R':
            print('No')
            exit()
    else:
        if input_line[i] == 'L':
            print('No')
            exit()

print('Yes')

Solution (Python):
import sys
import math
from fractions import gcd





def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""


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


 = int(sys.stdin.readline())
 = map(int, sys.stdin.readline().split())
 = list(map(int, sys.stdin.readline().split()))
 = [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""


S = sys.stdin.readline().rstrip()

O = []
E = []

for i, s in enumerate(S, 1):
    if i % 2 == 0:
        E.append(s)
    else:
        O.append(s)

if "R" not in E:
    if "L" not in O:
        print("Yes")
        exit()

print("No")

Solution (Python):
S=list(input())

rud=['R','U','D']
lud=['L','U','D']
odd=[S[i] for i in range(len(S)) if i%2==1]
eve=[S[i] for i in range(len(S)) if i%2==0]

for o in odd:
  if o not in lud:
    print('No')
    exit()
for e in eve:
  if e not in rud:
    print('No')
    exit()
print('Yes')

Solution (Python):
s = input()

ans = 'Yes'
i = 1
for c in s:
    if i % 2 == 1 and c == 'L':
        ans = 'No'
        break
    elif i % 2 == 0 and c == 'R':
        ans = 'No'
        break
    i += 1
print(ans)

Solution (Python):
import sys
import heapq
import bisect

mod = 10**9+7
dd = ((-1,0),(1,0),(0,-1),(0,1))

def I(): return(int(sys.stdin.readline()))
def LI(): return([int(x) for x in sys.stdin.readline().split()])
def S(): return((list(sys.stdin.readline()))[:-1])

def GCD(a,b):
    while b!=0:
        a,b = b,a%b
    return a

def LCM(a,b):
    return a * b // GCD(a,b)

def main():
    s = S()
    for i in range(len(s)):
        if i%2==0 and s[i] == "L":
            return "No"
        if i%2==1 and s[i] == "R":
            return "No"
    return "Yes"

if __name__ == "__main__":
    print(main())

Solution (Python):
Do = {"R","U","D"}
De = {"L","U","D"}
S = input().strip()
ind = 1
for i in range(len(S)):
    if (i+1)%2==1:
        if S[i] not in Do:
            ind = 0
            break
    elif (i+1)%2==0:
        if S[i] not in De:
            ind = 0
            break
if ind==1:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
c = 0
for i in range(len(s)):
    if i%2==0:
        if s[i] == "R" or s[i] == "U" or s[i] == "D":
            c += 1
            continue
        else:
            print("No")
            break
    else:
        if s[i] == "L" or s[i] == "U" or s[i] == "D":
            c += 1
            continue
        else:
            print("No")
            break
if c == len(s):
    print("Yes")

Solution (Python):
S = input()

flg = True
for n in range(len(S)):
  if n%2==0 and (S[n]!='R' and S[n]!='U' and S[n]!='D'):
    flg=False
  if n%2==1 and (S[n]!='L' and S[n]!='U' and S[n]!='D'):
    flg=False
if flg:
  print('Yes')
else:
  print('No')

Solution (Python):
S = input()

ans = "Yes"
for i in range(len(S)):
    if i % 2 and S[i] == 'R':
        ans = "No"
    elif i % 2 == 0 and S[i] == 'L':
        ans = "No"

print(ans)

Solution (Python):
tap = input()
cnt=1
for chat in tap:
    if cnt%2==0:
        if chat == "L" or chat =="U"or chat =="D":
            cnt+=1
        else:
            print("No")
            break
    else:
        if chat == "R" or chat =="U"or chat =="D":
            cnt+=1
        else:
            print("No")
            break
else:
    print("Yes")

Solution (Python):

s = input()
result = 0
for i in range(len(s)):
    if (i+1)%2 == 1:
        if s[i] == "L":
            result = 1
    else:
        if s[i] == "R":
            result = 1
if result == 0:
    print("Yes")
else :
    print("No")

Solution (Python):
S = input()
odd_f = True
even_f = True

for i, s in enumerate(S):
    if (i) % 2 == 0:
        if S[i] == 'L':
            odd_f = False
    else:
        if S[i] == 'R':
            even_f = False
if odd_f and even_f:
    print('Yes')
else:
    print('No')

Solution (Python):
a=input()
b=0
for i in range(len(a)):
    if i%2==0:
        if a[i]=="L":
            b+=1
            break
    else:
        if a[i]=="R":
            b+=1
            break

if b==0:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()

ans = 'Yes'

for i,foot in enumerate(s):
    if(i%2 == 0):
        if(foot == 'L'):
            ans ='No'
    if(i%2 == 1):
        if(foot == 'R'):
            ans ='No'

print(ans)

Solution (Python):
s = input().rstrip()

s1 = s[::2]
s2 = s[1::2]

if 'L' in s1 or 'R' in s2:
    print('No')
else:
    print('Yes')

Solution (Python):
a = input()
length = len(a)
dame=0

for i in range(0,int(length),2):
  if a[i] == "L":
    dame += 1
    break
for i in range(1,int(length),2):
  if a[i]=="R":
    dame += 1
    break
    
if dame == 0:
  print("Yes")
else:
  print("No")

Solution (Python):
s=list(input())
flg=0
for i in range(len(s)):
  if i%2==0: 
    if s[i] =='L':
      flg=1
  elif i%2!=0: 
    if s[i] =='R':
      flg=1
if flg==1:
  print('No')
else:
  print('Yes')

Solution (Python):
s = input()
ans = "Yes"
for i in range(len(s)):
  if i % 2 != 0:
    if s[i] not in ["L","U","D"]:
      print("No")
      exit()
  else:
    if s[i] not in ["R","U","D"]:
      print("No")
      exit()
print("Yes")

Solution (Python):
S = input()





for i in range(len(S)):
    if i % 2 == 0:
        if S[i] == 'R' or S[i] == 'U' or S[i] == 'D':
            continue
        else:
            print('No')
            exit(0)
    else:
        if S[i] == 'L' or S[i] == 'U' or S[i] == 'D':
            continue
        else:
            print('No')
            exit(0)
print('Yes')

Solution (Python):
a=input()
b='Yes'
for i in range(len(a)):
    if i%2==0:
        if a[i]=='L':
            b='No'
            break
    else:
        if a[i]=='R':
            b='No'
            break
print(b)

Solution (Python):
S = input()

for i in range(len(S)):
    if i % 2 == 0:
        if S[i] == 'R' or S[i] == 'U' or S[i] == 'D':
            continue
        else:
            print('No')
            break
    else:
        if S[i] == 'L' or S[i] == 'U' or S[i] == 'D':
            continue
        else:
            print('No')
            break
else:
    print('Yes')

Solution (Python):
s=input()
s1=s[::2];s2=s[1::2]
if 'L' in s1:print("No")
elif 'R' in s2:print("No")
else:print("Yes")

Solution (Python):
def solve():
    S = input()
    print("Yes" if "L" not in S[0::2] and "R" not in S[1::2] else "No")
solve()

Solution (Python):
import sys

S = input()

for s in S[0::2]:
    if s in 'RUD':
        pass
    else:
        print('No')
        sys.exit()

for s in S[1::2]:
    if s in 'LUD':
        pass
    else:
        print('No')
        sys.exit()
print('Yes')

Solution (Python):
s = list(input())
ans = True
odds = ["R","U","D"]
evens = ["L","U","D"]
for i in s[::2]:
    if not i in odds:
        ans = False

for j in s[1::2]:
    if not j in evens:
        ans = False

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

Solution (Python):
s = input()
f = True
odd = ['R','U','D']
even = ['L','U','D']
for i in range(len(s)):
  if i%2==0:
    if s[i] not in odd:
      f = False
      break
  else:
    if s[i] not in even:
      f = False
      break
if f: print('Yes')
else: print('No')

Solution (Python):
S = input()
even = S[0::2]
odd = S[1::2]

if not "L" in even and not "R" in odd:
    print("Yes")
else:
    print("No")

Solution (Python):
S = list(input())
ki = ["R", "U", "D"]
gu = ["L", "U", "D"]
ans = 0
for i in range(len(S)):
    if (i%2 == 0) and (S[i] not in ki):
        ans += 1
    elif (i%2 == 1) and (S[i] not in gu):
        ans += 1

if ans == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()


ki = ['R', 'U', 'D']
gu = ['L', 'U', 'D']

c = 0
for s in range(len(S)):
    if s % 2 == 0:
        if S[s] in ki:
            c += 1
    else:
        if S[s] in gu:
            c += 1

if c == len(S):
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()

for i in range(len(S)):
    if i % 2 == 0:
        if not (S[i] in ['R', 'U', 'D']):
            print('No')
            exit()
    else:
        if not (S[i] in ['L', 'U', 'D']):
            print('No')
            exit()

print('Yes')

Solution (Python):
S = input()
odd = ['R', 'U', 'D']
even = ['L', 'U', 'D']
for i, s in enumerate(S):
  if i%2 == 0:
    if not s in odd:
      print('No')
      exit()
  else:
    if not s in even:
      print('No')
      exit()
print('Yes')

Solution (Python):

S=input()
judge=0
for i in range(len(S)):
    if i%2==0:
        if S[i]=="L":
            judge=1
    else:
        if S[i]=="R":
            judge=1
if judge==0:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()

flag = True
odd_conds = ["R", "U", "D"]
even_conds = ["L", "U", "D"]
for i, c in enumerate(S):
    j = i+1
    if j %  2 == 0 and c in even_conds:
        pass
    elif j % 2 == 1 and c in odd_conds:
        pass
    else:
        flag = False
        break

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

Solution (Python):
def calc(S):
    for i in range(len(S)):
        if (S[i] == ('L' if i % 2 == 0 else 'R')):
            return 'No'
    return 'Yes'


S = input()
print(calc(S))

Solution (Python):
s=input()
list_s = [s[i] for i in range (len(s))]
flag = True
for i in range(len(s)):
  if flag:
    if i%2==0:
      if list_s[i]=="L":
        flag = False
    else:
      if list_s[i]=="R":
        flag = False
if flag:
  print("Yes")
else:
  print("No")

Solution (Python):
S = input()

S = list(S)

flg = 0

for i in range(1, len(S)+1, 1):


        if i%2!=0:
                if "L"==S[i-1]:
                        flg = 1
                        break
        elif i%2==0:
                if "R"==S[i-1]:
                        flg = 1
                        break



if flg == 0:
        print("Yes")
else:
        print("No")

Solution (Python):
S = input()
cnt = 0
for s in S:
  if cnt % 2 == 0:
    if s not in ['R', 'U', 'D']:
      print('No')
      exit()
  else:
    if s not in ['L', 'U', 'D']:
      print('No')
      exit()
  cnt += 1
print('Yes')

Solution (Python):
s = input()
ans = 0
for i in range(0,len(s),2):
    if s[i] == "L":
        ans += 1
    
for i in range(1,len(s),2):
    if s[i] == "R":
        ans += 1
        
if ans == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
N = len(S)
print('Yes' if not any(S[i] == 'LR'[i % 2] for i in range(N)) else 'No')

Solution (Python):
def main():
    s = list(input())
    for i in range(len(s)):
        if (i%2 == 0 and s[i] =='L') or (i%2 ==1 and s[i]=='R'):
            print('No')
            exit()
    print('Yes')



if __name__ == '__main__':
    main()

Solution (Python):
from sys import stdin, exit
S = stdin.readline().rstrip()
odd = ['R', 'U', 'D']
even = ['L', 'U', 'D']
for s in S[0::2]:
    if s not in odd:
        print('No')
        exit()
for s in S[1::2]:
    if s not in even:
        print('No')
        exit()
print('Yes')

Solution (Python):
import sys
input = sys.stdin.readline

def main():
    S = input()
    N = len(S)
    ans = "Yes"
    for i in range(N):
        if i % 2 == 0 and S[i] == "L":
            ans = "No"
            break
        elif i % 2 == 1 and S[i] == "R":
            ans = "No"
            break
    print(ans)

if __name__ == '__main__': main()

Solution (Python):
S = input()
output = 'Yes'
for i in range(len(S)):
    if (i + 1) % 2 == 1:
        if S[i] == 'L':
            output = 'No'
            break
    else:
        if S[i] == 'R':
            output = 'No'
            break

print(output)

Solution (Python):
s = input()
flag = True
for i in range(len(s)):
    if s[i] == 'R' and i % 2 == 1:
        flag = False
    if s[i] == 'L' and i % 2 == 0:
        flag = False
if flag:
    print('Yes')
else:
    print('No')

Solution (Python):
S = list(input())
kisu = ['R','U','D']
gusu = ['L','U','D']
ans = 'Yes'
for i in range(len(S)):
    if i%2==0:
        if S[i] in kisu:
            continue
        else:
            ans = 'No'
            break
    else:
        if S[i] in gusu:
            continue
        else:
            ans = 'No'
            break
print(ans)

Solution (Python):
s = input()
count = 1
answer = 0
for i in s:
    if count % 2 == 1:
        if i == 'R' or i == 'U' or i == 'D':
            answer += 0
        else:
            answer += 1
    elif count % 2 == 0:
        if i == 'L' or i == 'U' or i == 'D':
            answer += 0
        else:
            answer += 1
    count += 1
if answer == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()

ans = 'Yes'

for i in range(len(s)):
    if i % 2 == 0:
        if s[i] == 'L':
            ans = 'No'
            break
    else:
        if s[i] == 'R':
            ans = 'No'
            break

print(ans)

Solution (Python):
S = input()
l = len(S)
judge = True
for ii in range(l):
    if ii%2==0: 
        if S[ii]=='L':
            judge = False
    if ii%2==1: 
        if S[ii]=='R':
            judge = False
if judge:
    print('Yes')
else:
    print('No')

Solution (Python):
s=input()
ans=0
for i in range(len(s)):
  if i%2==0:
    if s[i]=='L':
      ans+=1
  else:
    if s[i]=='R':
      ans+=1
if ans==0:
  print('Yes')
else:
  print('No')

Solution (Python):


s = input()
flag = 0

for i in range(len(s)):
    if i%2 == 0:
        if s[i] == "L":
            flag = 1
    else:
        if s[i] == "R":
            flag =1
if flag == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
def resolve():
    s = input()

    for i in range(len(s)):
        
        if i % 2 == 0:
            if s[i] == 'L':
                print('No')
                return
        else:
            if s[i] == 'R':
                print('No')
                return

    print('Yes')




resolve()

Solution (Python):
s=input()
l1,l2=['R','U','D'],['L','U','D']
flg=0
for i in range(len(s)):
  if i%2==0 and s[i] not in l1:
    flg=1
    break
  elif i%2!=0 and s[i] not in l2:
    flg=1
    break
if flg==1:
  print("No")
else:
  print("Yes")

Solution (Python):
s = input()
for i, j in enumerate(s):
    if i % 2 == 0:
        if j == 'L':
            print('No')
            exit()
    else:
        if j == 'R':
            print('No')
            exit()
print('Yes')

Solution (Python):
steps = input()

i = 1
for step in steps:
    if i % 2 == 0:
        if step in ("L", "U", "D"):
            i = i + 1
            continue
        else:
            print("No")
            exit(0)
    else:
        if step in ("R", "U", "D"):
            i = i + 1
            continue
        else:
            print("No")
            exit(0)

print("Yes")

Solution (Python):
s = input()
for i in range(len(s)):
    if i % 2 == 0:
        if s[i] in ['R', 'U', 'D']:
            pass
        else:
            print('No')
            break
    if i % 2 == 1:
        if s[i] in ['L', 'U', 'D']:
            pass
        else:
            print('No')
            break
else:
    print('Yes')

Solution (Python):
s=input()
ans=0
for i in range(len(s)):
    if s[i]=='U' or s[i]=='D':
        ans+=1
    elif s[i]=='R' and i%2==0:
        ans+=1
    elif s[i]=='L' and i%2==1:
        ans+=1
if ans==len(s):
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
bre = 0
for i in range(len(S)):
	if i % 2 == 1:
		if S[i] == "R":
			bre = 1
	else:
		if S[i] == "L":
			bre = 1
if bre == 0:
	print("Yes")
else:
	print("No")

Solution (Python):
s = input()
gu = ['R','U','D']
ki = ['L','U','D']
bad = False
for i in range(len(s)):
    if i % 2 == 0:
        if s[i] not in gu:
            bad = True
    else:
        if s[i] not in ki:
            bad = True
if bad:
    print('No')
else:
    print('Yes')

Solution (Python):
S=input()
f = True
for s in S[::2]:
 if s not in {"R", "U", "D"}:
   f=False

for s in S[1::2]:
 if s not in {"L", "U", "D"}:
   f=False

if f:
  print("Yes")
else:
  print("No")

Solution (Python):
odds = ['R','U','D']
evens = ['L','U','D']

s = input()

fl = 0
for i in range(len(s)):
    if i % 2 == 0:
        if s[i] not in odds:
            fl = 1
            break
    if i % 2 == 1:
        if s[i] not in evens:
            fl = 1
            break

if fl == 0:
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()
temp = 1
result = 0
for i in S:
    if (temp % 2 == 0):
        if (i == "R"):
            result = 1
    else:
        if (i == "L"):
            result = 1
    temp += 1

if (result == 1):
    print("No")
else:
    print("Yes")

Solution (Python):

"""
Created on Sun Sep 15 20:38:11 2019

@author: Yamazaki Kenichi
"""

S = input()

counta = 1
ans = "Yes"
for c in S:
    if counta & 1:
        if c == "L":
            ans = 'No'
    else:
        if c == 'R':
            ans = 'No'
    counta += 1

print(ans)

Solution (Python):
from sys import exit, stderr, stdin
input = stdin.readline


def debug(var, name="hoge"):
    print(name +":" + str(type(var)) + " = " + repr(var), file=stderr)
    return


def main():
    S = input().rstrip()
    LS = len(S)
    o = set(["R","U","D"])
    e = set(["L","U","D"])
    for i in range(LS):
        if i%2 == 0:
            if S[i] not in o:
                print("No")
                exit()
        else:
            if S[i] not in e:
                print("No")
                exit()
    print("Yes")



if __name__ == "__main__":
    main()

Solution (Python):
s = input()
k = 'R'
g = 'L'

result = 'Yes'

for i, j in enumerate(s):
    if i % 2 == 0:
        if j == g:
            result = 'No'
            break
    else:
        if j == k:
            result = 'No'
            break
print(result)

Solution (Python):
S = input()

t = {
    1: ['L', 'U', 'D'],
    0: ['R', 'U', 'D'],
}

ans = 0

for i in range(len(S)):
    if S[i] in t[i % 2]:
        ans += 1

if ans == len(S):
    print('Yes')
else:
    print('No')

Solution (Python):
s=list(input())
n=len(s)
a='Yes'
for c in range(n):
    if c%2==0 and s[c]=='L':
        a='No'
        break
    if c%2==1 and s[c]=='R':
        a='No'
        break
print(a)

Solution (Python):
l = list(input().strip())

for i in range(len(l)):
    
    if i % 2 == 0:
        if l[i] not in ['R', 'U', 'D']:
            print('No')
            exit()
    else:
        if l[i] not in ['L', 'U', 'D']:
            print('No')
            exit()

print('Yes')

Solution (Python):
S = str(input())
S = list(S)

ans = 0

for i in range(1,len(S)+1) :
    if i % 2 == 1:
        if S[i-1] == 'L':
            ans = 1
    else:
        if S[i-1] == 'R':
            ans = 1
            
if ans == 0:
    print('Yes')
    
else:
    print('No')

Solution (Python):
S = list(input())
l = len(S)

for i in range(l):
  if i%2 ==0:
    if S[i] == 'L':
      print('No')
      exit()
  else:
    if S[i] == 'R':
      print('No')
      exit()
      
print('Yes')

Solution (Python):
kisuu = ["R", "U", "D"]

guusuu = ["L", "U", "D"]

S = str(input())


flag = True
for i in range(len(S)):
    if i % 2 == 0:  
        if S[i] not in kisuu:
            flag = False

    if i % 2 == 1:
        if S[i] not in guusuu:
            flag = False

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

Solution (Python):
if __name__ == '__main__':
    import sys
    input = sys.stdin.readline



    ss = str(input()[:-1])

    for s in ss[::2]:
        if s == 'L':
            print('No')
            exit()

    for s in ss[1::2]:
        if s == 'R':
            print('No')
            exit()
    print('Yes')

Solution (Python):
def solve():
    data = read()
    result = think(data)
    write(result)


def read():
    return read_line()


def read_int(n):
    return list(map(lambda x: int(x), read_line().split(' ')))[:n]


def read_float(n):
    return list(map(lambda x: float(x), read_line().split(' ')))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(data):
    odd = data[::2]
    even = data[1::2]

    return 'Yes' if odd.find('L') == -1 and even.find('R') == -1 else 'No'


def write(result):
    print(result)


if __name__ == '__main__':
    
    
    
    
    solve()

Solution (Python):
S = input()
for i in range(len(S)):
    if i % 2 == 0:
        if S[i] not in 'RUD':
            print('No')
            exit()
    else:
        if S[i] not in 'LUD':
            print('No')
            exit()
print('Yes')

Solution (Python):
S=input()

isok=True
for i,s in enumerate(S):
    if (i+1) % 2 == 0:
        if s=='R':
            isok=False
            break
    else:
        if s=='L':
            isok=False
            break

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

Solution (Python):
s = input()

flg = 1
for i, a in enumerate(s):
    if (i) % 2 == 0:
        if a == "L":
            flg = 0
    else:
        if a == "R":
            flg = 0

if flg:
    print("Yes")
else:
    print("No")

Solution (Python):

import sys

import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

readl= lambda: list(map(int, sys.stdin.readline().split()))
readt= lambda: tuple(map(int, sys.stdin.readline().split()))
read = lambda: sys.stdin.readline().rstrip()
readi = lambda: int(read())
readmi = lambda: map(int, sys.stdin.readline().split())
readms = lambda: map(str, sys.stdin.readline().split())

s = list(read())
flg = True
for i in range(1, len(s) + 1):
    if i % 2 == 1:
        if s[i - 1] == "R" or s[i - 1] == "U" or s[i - 1] == "D":
            pass
        else:
            flg = False
    else:
        if s[i - 1] == "L" or s[i - 1] == "U" or s[i - 1] == "D":
            pass
        else:
            flg = False

if flg:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
for i, j in enumerate(s):
    if i % 2 == 0:
        if j == 'L':
            print('No')
            exit()
    else:
        if j == 'R':
            print('No')
            exit()
print('Yes')

Solution (Python):
s = input()
ans = "Yes"
for i in range(len(s)):
    if i % 2 == 0 and (s[i] == "R" or s[i] == "U" or s[i] == "D"):
        continue
    elif i % 2 == 1 and (s[i] == "L" or s[i] == "U" or s[i] == "D"):
        continue
    else:
        ans = "No"
        break
print(ans)

Solution (Python):
S = input()
flag = 1

for i in range(len(S)):
    if i % 2 == 0:
        if S[i] == "L":
            flag = 0
    else:
        if S[i] == "R":
            flag = 0

if flag == 0:
    print("No")
else:
    print("Yes")

Solution (Python):
S = input()
kisu = []
gusu = []
for i in range(len(S)):
    if i == 0:
        kisu.append(S[i])
    elif i == 1:
        gusu.append(S[i])
    elif i%2 == 0:
        kisu.append(S[i])
    else:
        gusu.append(S[i])
if kisu.count("R")+kisu.count("U")+kisu.count("D") == len(kisu):
    if gusu.count("L")+gusu.count("U")+gusu.count("D") == len(gusu):
        print("Yes")
    else:
        print("No")
else:
    print("No")

Solution (Python):
S = input()
n = len(S)

for i in range(n):
    if S[i] == "R" and i % 2 == 1:
        print("No")
        break
    elif S[i] == "L" and i % 2 == 0:
        print("No")
        break
else:
    print("Yes")

Solution (Python):
S = input()

ans = 0
for i in range(len(S)):
    c = S[i]
    if ((i%2==1 and c=="R") or (i%2==0 and c=="L")):
        ans = 1
        break

print(["Yes", "No"][ans])

Solution (Python):
S = input()
if all(c in 'RUD' for c in S[::2]) and all(c in 'LUD' for c in S[1::2]):
  print('Yes')
else:
  print('No')

Solution (Python):



import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

S = input()

def check(S):
    for i, s in enumerate(S):
        if i%2 == 0 and s == 'L':
            return False
        if i%2 == 1 and s == 'R':
            return False
    return True

if check(S):
    Yes()
else:
    No()

Solution (Python):
import sys
stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

s = ns()
ok = True
for i, si in enumerate(s):
    if i%2:
        if si == "R":
            ok = False

    else:
        if si == "L":
            ok = False

print("Yes" if ok else "No")

Solution (Python):
s=input()
n=len(s)
ans = "Yes"

for i in range(n):
  if i%2==0 and s[i]=="L":
    ans ="No"
  elif i%2==1 and s[i]=="R":
    ans = "No"
    
print(ans)

Solution (Python):






import sys
s=input()

for idx, i in enumerate(s):
    if idx % 2 == 0:
        if i not in ["R", "U", "D"]:
            print("No")
            sys.exit()
    else:
        if i not in ["L", "U", "D"]:
            print("No")
            sys.exit()
print("Yes")

Solution (Python):
s = input()
n = len(s)
k = 1
for i in range(n):
  if s[i] == "D" or s[i] == "U":
    continue
  elif i % 2 == 0:
    if s[i] != "R":
      k = 0
  else:
    if s[i] != "L":
      k = 0
r = ["No","Yes"]
print(r[k])

Solution (Python):
s = list(input())

count = 0
for i in range(len(s)):
    if i % 2 == 0:
        if s[i] == 'R' or s[i] == 'U' or s[i] == 'D':
            count += 1
        else:
            break
    else:
        if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
            count += 1
        else:
            break

if count == len(s):
    print('Yes')
else:
    print('No')

Solution (Python):
S=input()
S_odd=S[1::2]
S_even=S[0::2]
ans="Yes"
for s in S_odd:
  if s=="L" or s=="U" or s=="D":
    pass
  else:
    ans="No"
    break
for s in S_even:
  if s=="R" or s=="U" or s=="D":
    pass
  else:
    ans="No"
    break
print(ans)

Solution (Python):
s = input()
flag = False
for i in range(len(s)):
    if i%2==0 and s[i]=='L':
        flag = True
    elif i%2==1 and s[i]=='R':
        flag = True
print('No' if flag else 'Yes')

Solution (Python):
S = input()
for i in range(len(S)):
    if i%2 == 0:
        if S[i] != "R" and S[i] != "U" and S[i] != "D":
            print("No")
            exit()
    else:
        if S[i] != "L" and S[i] != "U" and S[i] != "D":
            print("No")
            exit()
print("Yes")

Solution (Python):
import sys
s = list(input())

for i in range(len(s)):
    if (i + 1) % 2 == 0:
        if s[i] == 'R':
            print('No')
            sys.exit(0)
    else:
        if s[i] == 'L':
            print('No')
            sys.exit(0)
print('Yes')

Solution (Python):
from collections import Counter, defaultdict
import sys
sys.setrecursionlimit(10 ** 5 + 10)

from math import factorial
import heapq, bisect
import math
import itertools


import queue
from collections import deque


def main():
    s = list(input())
    aaa = ['R', 'U', 'D']
    bbb = ['L', 'U', 'D']

    flg = 1
    for i in range(len(s)):
        if i % 2:
            if s[i] not in bbb:
                flg = 0
        else:
            if s[i] not in aaa:
                flg = 0

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


if __name__ == '__main__':
    main()

Solution (Python):
S = list(input())
flg = True
for i in range(len(S)):
    if i%2==0:
        if S[i] not in {"R","U","D"}:
            flg = False
            break
    else:
        if S[i] not in {"L","U","D"}:
            flg = False
            break

print("Yes" if flg else "No")

Solution (Python):
S = list(input())

false_flag = 0
for i, char in enumerate(S):
    
    if i % 2 == 0:
        if char == 'L':
            false_flag = 1
            break
    if i % 2 == 1:
        if char == 'R':
            false_flag = 1
            break

if false_flag == 0:
    print('Yes')
else:
    print('No')

Solution (Python):
s=input();print(" YNeos"[set(s[::2])<=set("RUD")and set(s[1::2])<=set("LUD")::2])

Solution (Python):
s = input()
s_list1 = []
s_list2 = []
for i in range(len(s)):
    if (i+1)%2 == 0:
        s_list2.append(s[i:i+1])
    else:
        s_list1.append(s[i:i+1])


if s_list1.count("L") == 0 and s_list2.count("R") == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
for i, s in enumerate(S):
    if i%2 == 1 and s == 'R':
        print('No')
        break
    if i%2 == 0 and s == 'L':
        print('No')
        break
else:
    print('Yes')

Solution (Python):
s = input()

for i in range(len(s)):
    if i % 2 == 0:
        if s[i] == 'L':
            print('No')
            exit()
    if i % 2 != 0:
        if s[i] == 'R':
            print('No')
            exit()

print('Yes')