#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
LL s,k;
int main()
{
	scanf("%lld",&s);
	k=ceil(sqrt(s));
	LL c=k*k-s;
	if(c==0)
	{
		printf("%lld %lld %lld %lld %lld %lld\n",0,0,k,0,0,k);
		return 0;
	}
	LL d=sqrt(c);
	while(c%d!=0)d--;
	printf("%lld %lld %lld %lld %lld %lld\n",0,0,k,d,c/d,k);
	return 0;
}