import Foundation

let S = readLine()!

var charList = [Character]()

for c in S.characters{
    charList.append(c)
}

if charList[2] == charList[3] && charList[4]  == charList[5] {
    print("Yes")
} else {
    print("No")
}
