Pairwise-stability and Nash equilibria in network formation