#include <iostream>
#include <cmath>
using namespace std;
// Hàm kiểm tra số nguyên dương có phải là số chính phương không
bool isPerfectSquare(int x) {
int s = sqrt(x);
return s * s == x;
}
int main() {
int S;
cin >> S;
// Tìm dx, dy sao cho dx^2 + dy^2 = S
for (int dx = 0; dx * dx <= S; ++dx) {
int dy2 = S - dx * dx; // dy^2 = S - dx^2
if (dy2 >= 0 && isPerfectSquare(dy2)) {
int dy = sqrt(dy2);
// Tạo tọa độ 4 đỉnh
int x1 = 0, y1 = 0;
int x2 = x1 + dx, y2 = y1 + dy;
int x3 = x2 - dy, y3 = y2 + dx;
int x4 = x1 - dy, y4 = y1 + dx;
// Kiểm tra phạm vi tọa độ
if (abs(x1) <= 1e9 && abs(y1) <= 1e9 &&
abs(x2) <= 1e9 && abs(y2) <= 1e9 &&
abs(x3) <= 1e9 && abs(y3) <= 1e9 &&
abs(x4) <= 1e9 && abs(y4) <= 1e9) {
cout << x1 << " " << y1 << endl;
cout << x2 << " " << y2 << endl;
cout << x3 << " " << y3 << endl;
cout << x4 << " " << y4 << endl;
return 0;
}
}
}
// Nếu không tìm thấy lời giải
cout << "Impossible" << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgovLyBIw6BtIGtp4buDbSB0cmEgc+G7kSBuZ3V5w6puIGTGsMahbmcgY8OzIHBo4bqjaSBsw6Agc+G7kSBjaMOtbmggcGjGsMahbmcga2jDtG5nCmJvb2wgaXNQZXJmZWN0U3F1YXJlKGludCB4KSB7CiAgICBpbnQgcyA9IHNxcnQoeCk7CiAgICByZXR1cm4gcyAqIHMgPT0geDsKfQoKaW50IG1haW4oKSB7CiAgICBpbnQgUzsKICAgIGNpbiA+PiBTOwoKICAgIC8vIFTDrG0gZHgsIGR5IHNhbyBjaG8gZHheMiArIGR5XjIgPSBTCiAgICBmb3IgKGludCBkeCA9IDA7IGR4ICogZHggPD0gUzsgKytkeCkgewogICAgICAgIGludCBkeTIgPSBTIC0gZHggKiBkeDsgLy8gZHleMiA9IFMgLSBkeF4yCiAgICAgICAgaWYgKGR5MiA+PSAwICYmIGlzUGVyZmVjdFNxdWFyZShkeTIpKSB7CiAgICAgICAgICAgIGludCBkeSA9IHNxcnQoZHkyKTsKCiAgICAgICAgICAgIC8vIFThuqFvIHThu41hIMSR4buZIDQgxJHhu4luaAogICAgICAgICAgICBpbnQgeDEgPSAwLCB5MSA9IDA7CiAgICAgICAgICAgIGludCB4MiA9IHgxICsgZHgsIHkyID0geTEgKyBkeTsKICAgICAgICAgICAgaW50IHgzID0geDIgLSBkeSwgeTMgPSB5MiArIGR4OwogICAgICAgICAgICBpbnQgeDQgPSB4MSAtIGR5LCB5NCA9IHkxICsgZHg7CgogICAgICAgICAgICAvLyBLaeG7g20gdHJhIHBo4bqhbSB2aSB04buNYSDEkeG7mQogICAgICAgICAgICBpZiAoYWJzKHgxKSA8PSAxZTkgJiYgYWJzKHkxKSA8PSAxZTkgJiYKICAgICAgICAgICAgICAgIGFicyh4MikgPD0gMWU5ICYmIGFicyh5MikgPD0gMWU5ICYmCiAgICAgICAgICAgICAgICBhYnMoeDMpIDw9IDFlOSAmJiBhYnMoeTMpIDw9IDFlOSAmJgogICAgICAgICAgICAgICAgYWJzKHg0KSA8PSAxZTkgJiYgYWJzKHk0KSA8PSAxZTkpIHsKICAgICAgICAgICAgICAgIGNvdXQgPDwgeDEgPDwgIiAiIDw8IHkxIDw8IGVuZGw7CiAgICAgICAgICAgICAgICBjb3V0IDw8IHgyIDw8ICIgIiA8PCB5MiA8PCBlbmRsOwogICAgICAgICAgICAgICAgY291dCA8PCB4MyA8PCAiICIgPDwgeTMgPDwgZW5kbDsKICAgICAgICAgICAgICAgIGNvdXQgPDwgeDQgPDwgIiAiIDw8IHk0IDw8IGVuZGw7CiAgICAgICAgICAgICAgICByZXR1cm4gMDsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KCiAgICAvLyBO4bq/dSBraMO0bmcgdMOsbSB0aOG6pXkgbOG7nWkgZ2nhuqNpCiAgICBjb3V0IDw8ICJJbXBvc3NpYmxlIiA8PCBlbmRsOwogICAgcmV0dXJuIDA7Cn0K