#include <iostream>
#include <cmath>

using namespace std;

int main()
{
	long long S;
	cin >> S;

	long long M = (long long)sqrt(S);
	while (M * M < S) {
		++M;
	}
	cout << M << " 0 " << M - 1 << " " << M << " 0 " << M * M - S << endl;
}
