import java.io.BufferedReader
import java.io.InputStream
import java.io.InputStreamReader
import java.io.PrintWriter
import java.lang.StringBuilder
import java.math.BigInteger
import java.util.*

fun PrintWriter.solve(sc: FastScanner) {
    val h = sc.nextInt()
    val w = sc.nextInt()
    val n = sc.nextInt()
    val r = sc.nextInt()
    val c = sc.nextInt()
    val s = sc.nextLine()
    val t = sc.nextLine()
    var left = 0
    var right = 0
    var up = 0
    var down = 0
    var ok = true
    for (i in 0 until n) {
        if (s[i] == 'L') left++
        if (s[i] == 'R') right++
        if (s[i] == 'U') up++
        if (s[i] == 'D') down++

        if (c - left <= 0) {
            ok = false
        }
        if (c + right > w) {
            ok = false
        }
        if (r - up <= 0) {
            ok = false
        }
        if (r + down > h) {
            ok = false
        }

        if (t[i] == 'L' && c + right - 1 > 0) right--
        if (t[i] == 'R' && c - left + 1 < w) left--
        if (t[i] == 'U' && r + down - 1 > 0) down--
        if (t[i] == 'D' && r - up + 1 < h) up--
    }
    println(if (ok) "YES" else "NO")
}

fun main(args: Array<String>) {
    val writer = PrintWriter(System.out, false)
    writer.solve(FastScanner(System.`in`))
    writer.flush()
}

class FastScanner(s: InputStream) {
    private var st = StringTokenizer("")
    private val br = BufferedReader(InputStreamReader(s))

    fun next(): String {
        while (!st.hasMoreTokens()) st = StringTokenizer(br.readLine())

        return st.nextToken()
    }

    fun nextInt() = next().toInt()
    fun nextLong() = next().toLong()
    fun nextLine() = br.readLine()
    fun nextDouble() = next().toDouble()
    fun ready() = br.ready()
}
