module A
  sub Main(byval args() as string)
    dim s as string = console.readline()
    if s.substring(2,1) = s.substring(3,1) andalso s.substring(4,1) = s.substring(5,1) then
      console.writeline("Yes")
    else
      console.writeline("No")
    end if
  end sub
end module