atcoder#AGC025D. [AGC025D] Choosing Points
[AGC025D] Choosing Points
Score : points
Problem Statement
Takahashi is doing a research on sets of points in a plane. Takahashi thinks a set of points in a coordinate plane is a good set when satisfies both of the following conditions:
- The distance between any two points in is not .
- The distance between any two points in is not .
Here, and are positive integer constants that Takahashi specified.
Let be a set of points on a coordinate plane where and are integers and satisfy .
Takahashi has proved that, for any choice of and , there exists a way to choose points from so that the chosen points form a good set. However, he does not know the specific way to choose such points to form a good set. Find a subset of whose size is that forms a good set.
Constraints
- All values in the input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print distinct points that satisfy the condition in the following format:
:
Here, represents the -th chosen point. must hold, and they must be integers. The chosen points may be printed in any order. In case there are multiple possible solutions, you can output any.
2 1 2
0 0
0 2
2 0
2 2
Among these points, the distance between points is either or , thus it satisfies the condition.
3 1 5
0 0
0 2
0 4
1 1
1 3
1 5
2 0
2 2
2 4