#include<bits/stdc++.h>
using namespace std;
int main() {
	long long x1,y1,x2,y2,x3,y3,s;
	cin>>s;
	x1=y1=0,x2=y3=sqrt(s);
	if(x2*y3==s) y2=x3=0;
	else {
		x2++,y3++;
		x3=1;
		y2=x2*y3-s;
	}
	cout<<x1<<' '<<y1<<' '<<x2<<' '<<y2<<' '<<x3<<' '<<y3<<endl;
	return 0;
}