Copa America hosts Brazil finished top of their group with an impressive performance in a 5-0 victory over Peru in Sao Paulo on Saturday.
Looking like their imperious old selves, the host nation went ahead after 12 minutes when Casemiro was on hand to nod home after a goalmouth scramble and Roberto Firmino made it two seven minutes later after keeper Pedro Gallese made a hash of his kick.
Firmino charged down the kick and the ball rebounded off the post but Firmino picked up the rebound and rounded the keeper to roll the ball into the empty goal.
Man of the Match Everton added a nice third after 32 minutes when he cut in from the left and unleashed a low shot that sneaked inside Gallese's near post and Dani Alves made it 4-0 eight minutes into the second half when he finished off a neat team move and lashed the ball into the roof of the net.
The result, combined with Venezuela's 3-1 win over Bolivia, means the hosts top Group A and will play one of the two third-placed teams at the Gremio arena on Thursday.
After struggling in the first half of their previous two games, and failing to score in both, the two early goals settled Brazil and gave them more space to play, said coach Tite.
"When you score an early goal the team has play differently and open up, that is real," he said.
The only down side for Brazil was a second yellow card in three games for Casemiro, which means the combative Real Madrid midfielder will miss Thursday's quarter-final.
Second-placed Venezuela will face the second team in Group B on Friday at the Maracana stadium in Rio de Janeiro, while Peru must wait to see if their four points are enough to earn them a place as one of the two best third-placed sides.
"It's not up to us now, that's the uncomfortable situation," Peru coach Ricardo Gareca said.
"They were better than us from start to finish. Brazil had lots of chances in their other games and never took them. Today they took them."