Complementarities and Substitutabilities in Matching Models