An isosceles triangle has legs that are each `x` inches long and a base that is `y` inches long. The perimeter of this triangle is 38 inches. The base is 8 inches shorter than the length of a leg.



How long are the sides of the triangle?