Generation of high-power terahertz pulses in a prism