Four jewellers possessing respectively eight rubies, ten saphires, a hundred pearls and five diamonds, presented, each from his own stock, one apiece to the rest in token of regard; and they thus became owners of stock of precisely equal value. Tell me the prices of their gems and the values of their stocks. (Editors note: In this problem you are only given enough information to find the values of rubies, saphires and diamonds relative to the price of a pearl.)

[This problem comes from Lilavati , a standard work on Hindu mathematics written by Bhasakaracharyya, who lived in the twelfth century of the Christian era. The book is written as instruction for a young and beautiful woman called Lilavati and it is thought that she was Basakaracharyya's daughter.]