#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
const int X=1e9;
LL s;
int main(){
	cin>>s;
	printf("0 0\n");
	printf("1 %d\n",X);
	int x=(s-1)/X;
	int y=(s-1)%X+1;
	printf("%d %d\n",x+1,X-y);
	return 0;
}