An isosceles trapezoid has a perimeter of 40 centimeters. Its shorter base measures 9 centimeters and its longer base measures 13 centimeters. The two remaining sides have the same length; what is that length?