program coffee
  implicit none

  character(len=1) :: a, b, c, d, e, f

  read '(6A1)', a, b, c, d, e, f

  if (c == d .and. e == f) then
    print *, "Yes"
  else
    print *, "No"
  end if

end program coffee
