The sum of three consecutive terms of an AP is 21 and the sum of the squares of these terms is 165. Find these terms