import Foundation

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

func main(){
    let aryS = readLine()!.map { String($0) }
    print(aryS[2] == aryS[3] && aryS[4] == aryS[5] ? "Yes": "No")
}
main()
