Y-system and quasi-classical strings