41859
However it had the opposite effect ; the Spanish economy and empire lay in ruins after the Peninsular War , the Royal Company of the Philippines was by that time so unprofitable and ineffective as to be irrelevant , and Ferdinand a king who had learned nothing from the turmoil of the preceding years when he had been over thrown .
 location: empire; location: Philippines; person: Ferdinand
Given options, please tell me the categories of all the listed entity words.Output format is "type1: word1; type2: word2". 
Option: location, person, organization 
Text: {0} 
 Entities: empire, Philippines, Ferdinand 
Answer:
 location: empire; location: Philippines; person: Ferdinand