In a triangle whose perimeter is 52cm, the length of the longest side is 2cm less than the sum of the lengths of the other two sides. the difference between the length of the longest side and twice the length of the shortest side is 3 cm. how long is each side of the triangle