#include <cstdio>
#include <iostream>
#include <cstring>
using namespace std;
#define N 1000000000ll
long long s,a,b;
int main()
{
	cin>>s;
	a=(s/N+(s%N!=0));
	b=a*N-s;
	printf("0 0 %d %d 1 %d",N,b,a);
	return 0;
}