Solves size-4 problems.