The perimeter of a triangle is 42 centimeters. The longest side is 2 centimeters less than 3 times the shortest side and the pother side is 2 centimeters more than twice the shortest side. Find the length of each side.