Two polygons are given at the entrance (the coordinates of the vertices of these polygons are listed in the order of their traversal; however, the traversal order for different polygons can be chosen different). Is it possible to convert one polygon into another using only parallel translation and proportional scaling?
Find some vertex supposedly common to both polygons (maximum or minimum along the coordinates)
Make the transfer of one polygon so that these vertices lie on one point
Scaling so that the neighboring point matches the corresponding point of another polygon.
Check whether the other points match. If they match, you can; no, you can't.