A textbook store sold a combined total of 392 physics and psychology textbooks in a week. The number of physics textbooks sold was three times the number of psychology textbooks sold. How many textbooks of each type were sold?