Horsing Around

One military horse cannot pull a load of 40 dan; neither can 2 ordinary horses, nor can three inferior horses.  But one military horse and one ordinary horse can pull the load, as can two ordinary horses and one inferior horse, or three inferior and one military horse.  How much can each horse pull?

Jiuzhang Suanshu (The Nine Chapters on the Mathematical Art), c. 100 BCE

Click here to reveal the answer