let arrString = readLine()!.map{($0)}
    
    var r: Int = 0
    var t: Int = 0
    
    for _ in stride(from: arrString.startIndex, to: arrString.endIndex, by: 1) {
    
      if arrString[2] == arrString[3] && arrString[4] == arrString[5] {
        r += 1
      } else {
        t += 1
      }
    }
    if r > 0 {
      print("Yes")
    } else if t > 0 {
      print("No")
    }