program Coffee
  implicit none

  character(1) :: a(6)

  read '(6a)', a

  if (a(3) == a(4) .and. a(5) == a(6)) then
     print *, 'Yes'
  else
     print *, 'No'
  end if

  stop
end program Coffee
