"In this chest I have a number of pearls.
If I remove one, the number becomes a perfect square.
If I remove 2, the number becomes a multiple by 9.
If I divide these pearls amongst 5 knights equally, there is 1 left over.
If I divide them amongst 8 knights, then there are 5 left over.
The number of pearls is prime."
What is the minimum number of pearls in the king's chest?