Written perimeter and area functions