A Ranking Approach to Fair Classification