Universal Cup Judging System

Universal Cup

Time Limit: 3.0 s Memory Limit: 1024 MB Total points: 100 Hackable ✓
Statistics

You are given an integer $r$.

Construct six pairwise distinct points $P_1,P_2,\ldots,P_6$ with integer coordinates such that all of the following conditions hold:

  • $P_1$, $P_2$, $P_3$, and $P_4$ lie on one circle of radius exactly $r$;
  • $P_3$, $P_4$, $P_5$, and $P_6$ lie on one circle;
  • $P_1$, $P_2$, $P_5$, and $P_6$ lie on one circle;
  • the three circles above are pairwise distinct.

The centers of all three circles do not have to have integer coordinates. The radii of the second and third circles do not have to be integer either. Only the coordinates of the six constructed points are required to be integer.

Input

The first line contains a single integer $t$ ($1\le t\le50$): the number of test cases.

Each of the next $t$ lines contains one integer $r$ ($1\le r\le150$): the required radius of the first circle.

Output

For each test case, print six lines. The $i$-th line must contain two integers $x_i$ and $y_i$ ($|x_i|,|y_i|\le10\,000$), denoting the coordinates of $P_i$.

If there are several valid constructions, print any one of them.

Examples

Input 1

1
10

Output 1

6 8
10 0
-8 -6
0 10
13 15
15 15

Note

The example shows one possible construction. Other valid constructions are accepted as well.

problem_20731_198d60f965fc17c9439d9a0e2f8e48ce.png

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.