P9, P12, P21, P22, P56, P162: Simplified Mathematica solution.