import Foundation
func readInts() -> [Int] {
    return readLine()!.components(separatedBy: " ").map { Int($0)! }
}

let a = readInts()
let b = readInts()
let t = Int(readLine()!)!

var flag = false
for i in 0 ... t {
    if a[0] + a[1]*i == b[0] + b[1]*i {
        flag = true
        break
    }
}

print(flag ? "YES" : "NO")

