#include<cstdio>
const int LIMIT = int(1E9);
typedef long long ll;
int main() {
	ll S; scanf("%lld", &S);
	if( S == 1LL*LIMIT*LIMIT )
		printf("0 0 %d 0 0 %d\n", LIMIT, LIMIT);
	else printf("%d %d %d %d %d %d\n", 1, 0, S/LIMIT+1, S%LIMIT, 0, LIMIT);
}