Input-output structure of linear systems with application to the decoupling problem