Three-frequency interactions of high-intensity light waves in media with quadratic and cubic nonlinearities