h, w, n=gets.chomp.split(' ').map(&:to_i)
r, c=gets.chomp.split(' ').map(&:to_i)
b=gets.chomp.split('')
d=gets.chomp.split('')
e=[]
b.each_with_index {|f, i| e << f;e << d[i]}
s="YES"
l=e.length-1
for n in 0..l
  case e[n]
  when "L"
    c -= 1
  when "R"
    c += 1
  when "U"
    r -= 1
  when "D"
    r += 1
  end
  if r < 1 || c < 1 ||  r > h || c > w
    s="NO"
    break
  end
end
print("#{s}\n")