A rectangular photograph is mounted on a poster and has a two inch border on each side. The poster itself is mounted on a frame whose sides are the same length as the sides of the poster. The frame cost $2 per inch and the cost of the frame was $160. If the area of the photograph is 231 inches squared. What are the dimensions of the frame?