Market integration and imperfect competition in labor and product markets