what is the formula in finding the area and perimeter of polygon