how to find ratio of perimeter