Detection of the Yarkovsky effect for main-belt asteroids