Brian is placing a photograph behind a 12 in by 12 in piece of matting. He positions the photograph so the matting is twice as wide at the top and bottom as it is at sides. The visible area of the photograph is 54 in. What are the the dimensions of the photograph?