#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
const LL mx=1000000000ll;
LL S;
int main(){
	int i,j,k;
	scanf("%lld",&S);
	LL x1=mx,y2=(S+mx-1ll)/mx,x2=1ll,y1;
	y1=x1*y2-S;
	printf("%lld %lld %lld %lld %lld %lld\n",0ll,0ll,x1,y1,x2,y2);
	return 0;
}