A rectangular field is to be fenced off on three sides with the fourth side being the bank of a river. If the cost of the fence is $8 per foot for the two ends and $12 per foot for the side parallel to the river, what are the dimensions of the largest rectangle that can be enclosed with $3840 worth of fence