The pentagonal prism has a perpendicular distance of 14 units between the bases. The volume of the prism is 840 cubic units. What is the perimeter of the base?