The troubles of lmy
Lmy is the lovely cousin of zmq, and she’s a junior high school student. One day she came back from school.
Zmq: What did you learn in your class today?
Lmy: Similar triangle.
Zmq: Well, fine, have you mastered it?
Lmy: Sure, that’s a piece of cake.
Zmq: OK, well, let me test you to see whether you have thoroughly understood the conception of being similar. I’ll draw two Arbitrary Polygons, and you have to tell me whether they are similar or not. If you are right, I’ll take you out.
It seems that little lmy got into troubles. Can you help her out by designing a program?
There are several test cases in the input.
The first line of each case is an n (n <= 300), indicating that each polygon has n points. And in the following 2n lines, each line represents a point. The first n point represents the first polygon in anti-clockwise order, and so the second. Please note that all the polygons are simple.
You can try to rotate them, then tell whether they are similar or not.
For each case, output “Yes” or “No”, showing whether they are similar.
- The troubles of lmy