Assume a firm both sells its products and purchases its resources in purely competitive markets. Under the above assumption, state the criterion (necessary and sufficient condition) for a firm to employ its resources in such a manner as to minimize its total costs of producing any specified amount of output.