h,w,n = gets.split.map(&:to_i)
x,y = gets.split.map{|i|i.to_i-1}
s = gets.chomp.reverse
t = gets.chomp.reverse
a = 0
b = w-1
n.times do |i|
    a -= 1 if t[i] == "R"
    a = 0 if a < 0
    b += 1 if t[i] == "L"
    b = w-1 if b >= w

    a += 1 if s[i] == "L"
    b -= 1 if s[i] == "R"
    if a > b
        puts "NO"
        exit
    end
end
if y < a || b < y
    puts "NO"
    exit
end
a = 0
b = h-1
n.times do |i|
    a -= 1 if t[i] == "D"
    a = 0 if a < 0
    b += 1 if t[i] == "U"
    b = h-1 if b >= h

    a += 1 if s[i] == "U"
    b -= 1 if s[i] == "D"
    if a > b
        puts "NO"
        exit
    end
end
if x < a || b < x
    puts "NO"
    exit
end
puts "YES"