QOJ.ac

QOJ

Limite de temps : 2.0 s Limite de mémoire : 512 MB Points totaux : 100 Hackable ✓

#16930. 整数正方形

Statistiques

Iris 喜欢在网格纸上画不同的形状。她最喜欢的形状是正方形。最近,她尝试画一个面积为 $s$ 的正方形,但因为她使用的是网格纸,她希望正方形的所有顶点都具有整数坐标。

你能帮她找到这样一个正方形吗?

输入格式

输入包含一个整数 $s$ ($1 \le s \le 1000$)。

输出格式

如果可以构造出符合要求的正方形,输出四对整数:正方形顶点的坐标,顺序任意。所有坐标都必须在 $-10^9$ 到 $10^9$ 的范围内。如果存在多个答案,输出其中任意一个。

如果无法构造出符合要求的正方形,输出 "Impossible"。

样例

输入样例 1

5

输出样例 1

2 4
3 2
4 5
5 3

输入样例 2

3

输出样例 2

Impossible

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.