H,W,N = gets.split.map(&:to_i)
sr,sc = gets.split.map(&:to_i)
S = gets.chomp
T = gets.chomp

i = 0
l = r = sc
u = d = sr
while i < N
  s = S[i]
  t = T[i]

  r += 1 if s == 'R'
  l -= 1 if s == 'L'
  u -= 1 if s == 'U'
  d += 1 if s == 'D'
  # p [l,r,d,u]
  if l < 1 || W < r || u < 1 || H < d
    puts 'NO'
    exit 0
  end
  r -= 1 if t == 'L' && 1 < r
  l += 1 if t == 'R' && l < W
  u += 1 if t == 'D' && u < H
  d -= 1 if t == 'U' && 1 < d
  i += 1
end

puts 'YES'
