fun main(args: Array<String>) {
    val (N, A, B, C, D) = readLine()!!.split(" ").map{it.toLong()}

    val L = Math.abs(B - A)

    if (L > N * D) {
        println("NO")
        return
    }

    val M = C + D

    var l = C + D - (C * 2 - 1)
    for (i in 1 .. N - 2) {
        l = Math.min(M, l + D - C)
    }

    val t = (L + D * (N - 1)) % M

    if (t < l) {
        println("YES")
    } else {
        println("NO")
    }
}
