The height of a triangle is 3 centimeters less than the base. The area of the triangle is 9 square centimeters. Find the length of the base and the height of the triangle.