Brazil and Portugal progress after stalemate