An equilateral triangle and a square have the same perimeter of 12 inches. what is the ratio of the side length of the triangle to the side length of the square? express your answer as a common fraction.