The sum of two numbers is 164. The second number is 24 less than three times the first number. Find the numbers.