A textbook store sold a combined total of 325 history and sociology textbooks in a week. The number of sociology textbooks sold 89 less than the number of history textbooks sold. How many textbooks of each type were sold?