Qualitative Analysis of Classes of Motion for Multiresonant Systems I. An Algebraic Method