Italy’s Elia Viviani has won the second leg of the Giro D’Italia and Rohan Dennis has taken the pink jersey from defending champion Tom Dumoulin.