Collect the elements from a list by categories

This function takes an expression and sorts its factors between a list of two elements depending on whether they contain one of A, B, C. From there it is easy to build what you want:

list={3 b, A Cos[c]^2 Sin[a] Sin[b], -a E^(I a c) f[C, A], B, 1, Pi};

factorByABC[expr_] := With[{x = Switch[expr, _Times, List@@expr, _, List@expr], hasABC = !FreeQ[#, A | B | C]&},
  Times @@@ {Select[x, Not@*hasABC], Select[x, hasABC]}
];

factorByABC /@ list // Transpose // Print

(* {{3*b, Cos[c]^2*Sin[a]*Sin[b], -(a*E^(I*a*c)), 1, 1, Pi}, {1, A, f[C, A], B, 1, 1}} *)

Try it online!


selectDiscard = Map[Select @ # @* FreeQ[a|b|c|_Integer]]& /@ {Not, Identity}

list = {3 b, A Cos[c]^2 Sin[a] Sin[b], -a E^(I a c) f[C, A]};
Through @ selectDiscard @ list

{{3 b, Cos[c]^2 Sin[a] Sin[b], -a E^(I a c)},
{1, A, f[C, A]}}