An isosceles triangle has a perimeter of 82 cm. The lengths of the legs of the triangle are represented by (3x +2) and (5x-14). Find the length of the base of the triangle.