|Brazilian Neymar scores his second goal against Ecuador to take Brazil into the last eight [EPA]
Young strikers Alexandre Pato and Neymar scored two goals each as defending champions Brazil beat Ecuador 4-2 to finish top of Group B at the Copa America.
The win means Brazil will now play Paraguay in the quarter-finals, while Venezuela, who finished in second place, face Chile in San Juan.
The other quarter-finals pit hosts Argentina against Uruguay and Colombia against Peru.
Ecuador bowed out of the tournament with two good goals from Felipe Caicedo in an exciting match that capped a lively final night for the South American tournament's group stages.
Venezuela earlier mounted a remarkable late comeback to snatch a 3-3 draw against Paraguay in Salta.
"It was the type of match we needed," Pato said. "It was like a final to us and we had to win it no matter what. We did it and advanced in first place, which is what we wanted."
Brazil were coming off draws against Venezuela and Paraguay and needed at least a draw to keep alive their hopes for a third straight Copa America title.
With the victory over Ecuador Brazil ended Group B with five points, equal to Venezuela but ahead on goal difference. Paraguay made it to the quarter-finals with three as one of the two best third-place teams in the three groups.
"We played with that will to win," Pato said. "Everybody expects Brazil to always play a great match but it's very hard, all teams want to beat Brazil and today it wasn't different. Now it's time to get back to work. It's a new Copa America."
Brazil attacked from the onset and controlled parts of the game at the Estadio Mario Alberto Kempes.
With right back Maicon making his debut in the Copa America after replacing Daniel Alves in the starting lineup, Brazil were able to keep the ball for most of the match and created more scoring opportunities.
Brazilian striker Neymar fired a dangerous long-range shot over the crossbar just two minutes into the match, and a minute later defender Thiago Silva's headed wide from a corner.
Pato's header opened the scoring in the 28th minute as the left back Andre Santos crossed the ball into the area and the AC Milan striker came rushing in to firmly poke the ball into the right corner of Ecuador goalkeeper Marcelo Ramon Elizaga's net.
Caicedo equalised for Ecuador on the 37th minute after a blunder by Brazilian goalkeeper Julio Cesar, who allowed the striker's weak shot from the top of the area to get underneath him.
Second half display
In the second half Brazil took an early lead in the 48th minute after Ganso's perfect through pass found Neymar who slotted the ball home with a right-foot strike from near the penalty spot.
Ecuador continued to pile on the pressure with Caicedo who struck again on the 58th minute, sending another low shot past Julio Cesar from just inside the penalty box.
But it was in the last third of the match that Brazil took full control as Pato in the 60th minute hounded the Ecuadorian defence and came in and scored from close range, after defender Elizaga failed to hold on to the ball.
Neymar sealed the victory in the 76th minute, by converting a cross by Maicon after a great run on the right side.
Both Pato and Neymar repaid coach Mano Menezes's faith in playing young players in the Copa America as preparation the 2014 World Cup which is to be held in Brazil.