Perimeter of an isosceles triangle is 40 cm. The base is two third of the sum of sides. Find the length of each side.