equations for output and factor demands