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