Comparative advantage is determined by: