A textbook store sold a combined total of 257 math and psychology textbooks in a week. The number of math textbooks sold was 87 more than the number of psychology textbooks sold. How many textbooks of each type were sold?