import Foundation

func readInts() -> [Int] {
    readLine()!.split(separator: " ").map { Int($0)! }
}

func main(){
    let av = readInts()
    let bw = readInts()
    let t = Int(readLine()!)!
        
    for i in 1...t {
        
        if av[0] + av[1] * i == bw[0] + bw[1] * i {
            print("YES")
            return
        }
    }
    print("NO")
}
main()
