A linear-time algorithm for four-partitioning four