Mixed carton sizes make one formula insufficient. The answer is a line by line table, not a bigger box.
In 1976, Appel and Haken proved the Four Color Theorem by reducing it to thousands of cases and checking them mechanically.