A square flag includes three colors: yellow, black, and green. The colors of the flag appear in the proportion 3:2:1, with yellow accounting for the greatest area and green accounting for the least. If a total of 48 square inches of the flag is black, what are the dimensions of the flag?