A textbook store sold a combined total of 401 physics and history textbooks in a week. The number of physics textbooks sold was 89 more than the number of history textbooks sold. How many textbooks of each type were sold?