Characterization of the exponential and power distributions