#include <iostream>

using namespace std;

typedef long long ll;

int main() {
	ll s;
	cin >> s;
	ll n = 1e9;
	ll h = s/n;
	if (s%n == 0) h--;
	s -= h*n;
	cout << 0 << " " << 0 << " " << n << " " << 1 << " " << (n-s) << " " << h+1 << "\n";
}
