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):
import sys

sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return list(map(int, sys.stdin.readline().split()))
def II(): return int(sys.stdin.readline())
def LS(): return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]

def main():
    s = S()
    for i, v in enumerate(s):
        if i % 2 == 0:
            if v not in ("R", "U", "D"):
                print("No")
                return
        else:
            if v not in ("L", "U", "D"):
                print("No")
                return
    print("Yes")


if __name__ == '__main__':
    main()

Solution (Python):
s = list(input())
ans = "Yes"
for i in range(len(s)):
    if i%2 == 0:
        if s[i] == "L": ans = "No";break
    elif s[i] == "R": ans = "No";break
print(ans)

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

Solution (Python):
S = input()
judge = True
for i in range(len(S)):
    if (i+1) % 2 == 0:
        if S[i] not in {"L", "U", "D"}:
            judge = False
            break
    else:
        if S[i] not in {"R", "U", "D"}:
            judge = False
            break
if judge:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()
for i in s[::2]:
  if i == 'L':
    print('No')
    exit()
for i in s[1::2]:
  if i == 'R':
    print('No')
    exit()
print('Yes')

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

l=s[0::2]
r=s[1::2]

if 'L' in l or 'R' in r:
    print('No')
else:
    print('Yes')

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

Solution (Python):
s = input()
ok = True
for i in range(len(s)):
    if i % 2 == 0 and s[i] == 'L':
        ok = False
        break
    elif i % 2 == 1 and s[i] == 'R':
        ok = False
        break

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

Solution (Python):
import math

s= input()

ans="Yes"
for i in range(len(s)):
  if((s[i]=='L' and i%2==0)or(s[i]=='R'and i%2==1)):
    ans="No"
    
print(ans)

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

Solution (Python):
S = input()
for i,c in enumerate(S):
    if i % 2 == 0:
        if c != 'R' and c!= 'U' and c != 'D':
            print('No')
            exit()
    else:
        if c != 'L' and c!= 'U' and c != 'D':
            print('No')
            exit()
print('Yes')

Solution (Python):
S = input()
if 'L' in S[::2] or 'R' in S[1::2]:
    print('No')
else:
    print('Yes')

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

Solution (Python):
s = raw_input().strip()
n = len(s)

ok = 1
for i in xrange(n):
    if i & 1:
        if s[i] not in "LUD":
            ok = 0
            break
    else:
        if s[i] not in "RUD":
            ok = 0
            break

if ok:
    print "Yes"
else:
    print "No"

Solution (Python):
def main():

    S = input()
    for i in range(len(S)):
        if i % 2 == 1 and S[i] == "R":
            return "No"
        if i % 2 == 0 and S[i] == "L":
            return "No"
    return "Yes"
if __name__ == '__main__':
    print(main())

Solution (Python):
s = input()
def ans():
    for i in range(len(s)):
        if i%2==0:
            if s[i]!= 'R' and s[i]!= 'U' and s[i]!= 'D':
                print('No')
                return
        else:
            if s[i]!= 'L' and s[i]!= 'U' and s[i]!= 'D':
                print('No')
                return
    print('Yes')
ans()

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

Solution (Python):
s = input()
t = 1
kisuulist = ["R", "U", "D"]
guusuulist = ["L", "U", "D"]
for i in s:
  if(t%2==0):
    if i not in guusuulist:
      print("No")
      exit()
  else:
    if i not in kisuulist:
      print("No")
      exit()
  t+=1
print("Yes")

Solution (Python):
s = input().strip()
odd = list('RUD')
even = list('LUD')

ok = True
for i, c in enumerate(s):
    i += 1
    if (i % 2 == 0 and c not in even) or (i % 2 == 1 and c not in odd):
        ok = False
        break
if ok:
    print('Yes')
else:
    print('No')

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

def main():
    S = input().strip()
    for i,c in enumerate(S):
        if i%2 == 0:
            if c == "L":
                print("No")
                return
        if i%2 == 1:
            if c == "R":
                print("No")
                return
    print("Yes")

if __name__ == '__main__':
    main()

Solution (Python):
S = input()
for i in range(len(S)):
  if (i+1)%2==1:
    if not S[i] in ['R', 'U', 'D']:
      print('No')
      break
  else:
    if not S[i] in ['L', 'U', 'D']:
      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")
            break
    else:
        if S[i] == "R":
            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()
    else:
        if s[i] == 'R':
            print('No')
            exit()
print('Yes')

Solution (Python):

S = input()

flag = True
for i in range(len(S)):

    if i % 2 == 0 and S[i] == "L":
        flag = False
    elif i % 2 == 1 and S[i] == "R":
        flag = False

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

Solution (Python):

s = input()

for i in range(len(s)):
    c = s[i]
    if (i+1)%2==1:
        if c not in ("R","U","D"):
            print("No")
            exit()
    else:
        if c not in ("L","U","D"):
            print("No")
            exit()
print("Yes")

Solution (Python):
s = input()
a = s[0::2]
b = s[1::2]
print("Yes" if a.count("L") == 0 and b.count("R") == 0 else "No")

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

Solution (Python):
s = input()
print('No' if 'L' in s[::2] or 'R' in s[1::2] else 'Yes')

Solution (Python):
s = input()
a = ["R", "U", "D"]
b = ["L", "U", "D"]
for i, j in enumerate(s):
    if i % 2 == 0:
        if not j in a:
            print("No")
            exit()
    else:
        if not j in b:
            print("No")
            exit()

print("Yes")

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

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

Solution (Python):



import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline 




s = input()

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

ok = 1
for i in s1:
    if i == "L": ok = 0
for i in s2:
    if i == "R": ok = 0


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

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

Solution (Python):
s = input()


def main():
    for i, c in enumerate(s):
        if i % 2 == 0:
            if c in {'R', 'U', 'D'}:
                pass
            else:
                return False
        if i % 2 == 1:
            if c in {'L', 'U', 'D'}:
                pass
            else:
                return False
    return True


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

Solution (Python):
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac

setrecursionlimit(1000000)


def main():
	s = input()
	for i in range(math.ceil(len(s)/2)):
		if(s[i*2]not  in ['R','U','D']):
			print('No')
			exit()
	for i in range(math.floor(len(s)/2)):
		if(s[i*2+1]not  in ['L','U','D']):
			print('No')
			exit()
	print('Yes')


def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(l):
	x = l.pop()
	y = l.pop()
	while(x%y!=0):
		z = x%y
		x = y
		y = z
	l.append(min(x,y))
	return gcd(l) if len(l) > 1 else l[0]

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

main()

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

Solution (Python):
S = 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")
        break
else:
    print("Yes")

Solution (Python):

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

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

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

Solution (Python):
import sys
input=sys.stdin.readline
s=input().rstrip()
n=len(s)
for i in range(n):
    if i%2==0:
        if s[i]=='L':
            print('No')
            sys.exit()
    else:
        if s[i]=='R':
            print('No')
            sys.exit()
print('Yes')

Solution (Python):
import queue

"""
N = int(input())



A = []
for i in range(N):
	A.append(int(input()))

print(A)

"""
ch = True
S=input()
for i,s in enumerate(S):
	if i%2==0 and s=="L":
		ch = False
		break
	if i%2==1 and s=="R":
		ch = False
		break
if ch:
	print("Yes")
else:
	print("No")

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

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

def main():
  s=list(S())

  for i,x in enumerate(s):
    if i%2==0:
      if x in ['R','U','D']:
        pass
      else:
        return 'No'
    else:
      if x in ['L','U','D']:
        pass
      else:
        return 'No'
  return 'Yes'


print(main())

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

Solution (Python):
s = input()
ans = "Yes"
for i, c in enumerate(s):
    if i % 2 == 0:
        if c == "L":
            ans = "No"
    else:
        if c == "R":
            ans = "No"
print(ans)

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()

s = input()
l = ["R", "U", "D"]
r = ["L", "U", "D"]
flag = True
for c in s[1::2]:
    if c not in r:
        flag = False
        break
for c in s[0::2]:
    if c not in l:
        flag = False
        break
print('Yes' if flag else 'No')

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

Solution (Python):
S=input()
O = ["R","U","D"]
E = ["L","U","D"]

for k in range(len(S)):
    if k%2 == 0:
        if S[k] not in O:
            print("No")
            exit(0)
    else:
        if S[k] not in E:
            print("No")
            exit(0)
print("Yes")

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

flg = True
for i in range(len(S)):
    if (i+1)%2 == 1 and S[i] == 'L':
        flg = False
        break
    elif (i+1)%2 == 0 and S[i] == 'R':
        flg = False
        break
if flg:
    print("Yes")
else:
    print("No")

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

Solution (Python):
a = input()
odd = {"R","U","D"}
even = {"L","U","D"}
good = True
for i in range(len(a)):
    if i%2 == 0:
        if a[i] not in odd:
            good = False
    else:
        if a[i] not in even:
            good = False
if good:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
flag = True
for ss in s[::2]:
    if ss not in ["R", "U", "D"]:
        flag = False

for ss in s[1::2]:
    if ss not in ["L", "U", "D"]:
        flag = False

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

Solution (Python):
import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7

S = np.array(list(sys.stdin.readline().rstrip()))
a = np.any(S[::2] == 'L') or np.any(S[1::2] == 'R')
if not a:
    print('Yes')
else:
    print('No')

Solution (Python):
def main():
    s=input()
    ans="Yes"
    for i,c in enumerate(s):
        if i%2:
            if c=="R":
                ans="No"
                break
        else:
            if c=="L":
                ans="No"
                break
    print(ans)
main()

Solution (Python):
def getlist():
	return list(map(int, input().split()))

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

print(judge)

Solution (Python):
s = input()


flag = True
for i in range(len(s)):
    if (i+1) %2 == 0:
        if s[i] in ["L","U","D"]:
            continue
        else:
            flag = False
            break
    else:
        if s[i] in ["R","U","D"]:
            continue
        else:
            flag = False
            break

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

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

ans = 'Yes'
for i, s in enumerate(S):
    if i%2 == 0:
        if not s in ['R', 'U', 'D']:
            ans = 'No'
    if i%2== 1:
        if not s in ['L', 'U', 'D']:
            ans = 'No'
print(ans)

Solution (Python):
s = raw_input()
easy = True


for i in xrange(len(s)):
  if s[i] == 'R' and (i+1)%2 == 0:
    easy = False
  elif s[i] == 'L' and (i+1)%2 == 1:
    easy = False
if easy:
  print 'Yes'
else:
  print 'No'

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

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

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

Solution (Python):
s = input()

for i in range(len(s)):
    if i % 2 == 0:
        if s[i] in {'R','U','D'}:
            continue
        else:
            print('No')
            exit()
    if i% 2 != 0:
        if s[i] in {'L','U','D'}:
            continue
        else:
            print('No')
            exit()

print('Yes')

Solution (Python):
S = input()

ans = 'Yes'
for i in range(len(S)):
    s = S[i]

    if (i+1)%2 == 0:
        if s=='R':
            ans = 'No'
            break
    else:
        if s=='L':
            ans = 'No'
            break
print(ans)

Solution (Python):
Ss = input()

S1s = Ss[::2]
S2s = Ss[1::2]

if 'L' not in S1s and 'R' not in S2s:
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()
if 'L' in S[0::2] or 'R' in S[1::2]:
  print('No')
else:
  print('Yes')

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

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

print('Yes')

Solution (Python):
kisu=['R', 'U', 'D']
gusu=['L', 'U', 'D']

s=input()
swit=0
for i in range(len(s)):
    if i%2==0:
        if not(s[i] in kisu):
            swit=1
    else:
        if not(s[i] in gusu):
            swit=1

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

Solution (Python):
s = input()
ok = 1
for i, c in enumerate(s):
  if i%2:
    if c=='R': ok = 0
  else:
    if c=='L': ok = 0
print(['No','Yes'][ok])

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

Solution (Python):
S = input()

for i, s in enumerate(S):
    if i%2==0:
        if s=='R' or s=='U' or s=='D':
            pass
        else:
            print('No')
            exit()
    else:
        if s=='L' or s=='U' or s=='D':
            pass
        else:
            print('No')
            exit()
else:
    print('Yes')

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

Solution (Python):
def main():
    S = input()
    ok = True
    for c in S[::2]:
        if c == "L":
            ok = False
    for c in S[1::2]:
        if c == "R":
            ok = False
    if ok:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

Solution (Python):



import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

s = input()
n = len(s)
lst = ['R','U','D']
lst2 = ['L','U','D']
for i in range(n):
    if i % 2 == 0:
        if s[i] in lst:
            continue
        else:
            print('No')
            quit()
    else:
        if s[i] in lst2:
            continue
        else:
            print('No')
            quit()
print('Yes')

Solution (Python):
import sys
from heapq import heappop, heappush
from operator import itemgetter
from collections import deque, defaultdict, Counter
from bisect import bisect_left, bisect_right
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
MOD = 10**9 + 7
INF = float('inf')

def sol():
    S = input().rstrip()

    for i, s in enumerate(S):
        if i % 2 == 0:
            if s == 'L':
                print('No')
                return
        else:
            if s == 'R':
                print('No')
                return
    print('Yes')


sol()

Solution (Python):
s=input()

for i,c in enumerate(s):
  if i % 2 == 0 and c == 'L':
    print('No')
    break
  elif i % 2 and c == 'R':
    print('No')
    break
else:
  print('Yes')

Solution (Python):


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

Solution (Python):
S = input()

for i, s in enumerate(S):
    if i % 2:
        if s == "R":
            print("No")
            exit()
    else:
        if s == "L":
            print("No")
            exit()
print("Yes")

Solution (Python):
s = input()

if 'L' in s[::2] or 'R' in s[1::2]:
    print('No')
else:
    print('Yes')

Solution (Python):
s = input()

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

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

S=input().strip()
LEN=len(S)

flag=1

for i in range(LEN):
    if i%2==1:
        if S[i]=="R":
            flag=0

    else:
        if S[i]=="L":
            flag=0

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

Solution (Python):
s=input()
ev=[]
od=[]
for i in range(len(s)):
    if (i%2)==0:
        od.append(s[i])
    else:
        ev.append(s[i])
if "L" in od or "R" in ev:
    print("No")
else:
    print("Yes")

Solution (Python):

import sys
INF = float("inf")


def yes():
    print("Yes")  


def no():
    print("No")  


def solve(S: str):
    if "L" in S[0::2]:
        no()
        return
    elif "R" in S[1::2]:
        no()
        return
    yes()
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  
    solve(S)


if __name__ == '__main__':
    main()

Solution (Python):
S = input()

if any(c=='L' for c in S[::2]):
    print('No')
    exit()
if any(c=='R' for c in S[1::2]):
    print('No')
    exit()
print('Yes')

Solution (Python):
s = input()

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

Solution (Python):
s = input()

A=[["R","U","D"],["L","U","D"]]

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

if ans == len(s):
    print("Yes")
else:
    print("No")

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

Solution (Python):
import copy

def j(n):
    if n:print("Yes")
    else:print("No")
    exit(0)
rem = 10 ** 9 + 7

"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def ips():
    return (int(i) for i in input().split())
def ipmultiplerow(n):
    a = []
    for i in range(n):
        a.append(ip())
    return a
def printrow(a):
    for i in a:
        print(i)
a = input()
for i in range(len(a)):
    if i%2:
        if a[i] == "R":j(0)
    else:
        if a[i] == "L":j(0)
j(1)

Solution (Python):
S = input()

flag = True
for i, s in enumerate(S):
    if i % 2 == 0:
        if s in ["R", "U", "D"]:
            continue
        else:
            flag = False
    else:
        if s in ["L", "U", "D"]:
            continue
        else:
            flag = False


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

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

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

Solution (Python):
S = input()
flag = True
for s in S[::2]:
    if(s == 'L'):
        flag = False
        break
for s in S[1::2]:
    if(s == 'R'):
        flag = False
        break
if(flag):
    print('Yes')
else:
    print('No')

Solution (Python):

s = input()
ans = True
for i in range(len(s)):
    if i % 2 == 0:
        if s[i] == 'L':
            ans = False
    else:
        if s[i] == 'R':
            ans = False
print(['No', 'Yes'][ans])

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

def main():
    s = input().strip()

    ok = True
    for i in range(len(s)):
        if i&1:
            if s[i] == "R":
                ok = False
                break
        else:
            if s[i] == "L":
                ok = False
                break
    
    if ok:
        print("Yes")
    else:
        print("No")

if __name__ == "__main__":
    main()

Solution (Python):
b = list(input())
if all(i in ["R", "U", "D"] for i in b[::2]) and all(i in ["L", "U","D"] for i in b[1::2]):
    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"
    else:
        if s[i] == "R":
            ans = "No"
print(ans)

Solution (Python):
s=input()
for n,i in enumerate(s):
    if n%2==0 and i=="L" or n%2==1 and i=="R":
        print("No")
        exit()
print("Yes")

Solution (Python):
s=input()
l=len(s)
for i in range(l):
  if i%2==0 and s[i]=="L":print("No");exit()
  if i%2==1 and s[i]=="R":print("No");exit()
print("Yes")

Solution (Python):
string = input()
flg = True
for k, i in enumerate(string):
    if k % 2 == 0:
        if i not in ['R', 'U', 'D']:
            flg = False
    else:
        if i not in ['L', 'U', 'D']:
            flg = False
print('Yes') if flg else print('No')

Solution (Python):
s = input()

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

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

print('Yes')

Solution (Python):

import sys
sys.setrecursionlimit(12345678)
import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop


def main():
    s = input()
    for i in range(len(s)):
        num = i + 1
        if num % 2 == 1:
            
            if s[i] not in 'RUD':
                print('No')
                return
        else:
            
            if s[i] not in 'LUD':
                print('No')
                return

    print('Yes')

if __name__ == '__main__':
    main()

Solution (Python):
s=input()
odd=["R", "U", "D"]
ev=["L", "U", "D"]

def t():
    for i,d in enumerate(s):
        if (i+1)%2==1:
            if not d in odd:
                return "No"
        else:
            if not d in ev:
                return "No"
    return "Yes"

print(t())

Solution (Python):
s=input()
if 'L' in s[::2] or 'R' in s[1::2]:
    print('No')
else:
    print('Yes')

Solution (Python):
S = input()

ans = True
for i in range(0, len(S), 2):
  if S[i] == 'L':
    ans = False
for i in range(1, len(S), 2):
  if S[i] == 'R':
    ans = False
print('Yes' if ans else '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 == 1:
    print("No")
else:
    print("Yes")

Solution (Python):
import sys
import math
from collections import defaultdict

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N):
    read_all = [tuple(map(int, input().split())) for _ in range(N)]
    return map(list,zip(*read_all))



S = str(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()
N=len(S)
flag=1
for i in range(N):
    if i%2==0 and S[i]=="L":
        flag=0
    if i%2==1 and S[i]=="R":
        flag=0
if flag==1:
    print("Yes")
else:
    print("No")

Solution (Python):
g = ['R','U','D']
k = ['L', 'U', 'D']

S = input()
ans = 'Yes'
for i in range(len(S)):
    if i % 2 == 0:
        if S[i] not in g:
            ans = 'No'
            break
    else:
        if S[i] not in k:
            ans = 'No'
            break
print(ans)