A rectangular field with one side along a river is to be fenced. Suppose that no fence is needed along the river, the fence on the side opposite the river costs $40 per foot, and the fence on the other sides costs $10 per foot. If the field must contain 39,200 square feet, what dimensions will minimize costs?