Ranking with Large Margin Principle: Two Approaches