if a triangle and a square has the same perimeter what is the ratio of its sides