A farmer has 2400 feet of fencing and wants to fence off a rectangular field that borders a straight river. Find the dimensions of the fence to maximize the area enclosed by the fence.