#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll s,n;
int main(){
	scanf("%lld",&s);
	n=(s-1)/1000000000+1;
	printf("0 0 1 1000000000 %lld %lld\n",n,n*1000000000-s);
	return 0;
}