The senior class at Northwest High School needed to raise money for the yearbook. A local sporting goods store donated hats and
T-shirts. The number of T-shirts was three times the number of hats. The seniors charged $5 for each hat and $8 for each T-shirt. If the seniors sold everything and raised $435, what was the total number of hats and the total number of T-shirts that were sold?