Archimedes' Cattle Problem/Difficult Version

Classic Problem
In addition:


 * All the white and black bulls were arranged in a square


 * All the dappled and brown bulls were arranged in a triangle.

What was the composition of the herd?