// A - Triangle
#include <bits/stdc++.h>
using namespace std;
using ll = long long;

void xy(ll x, ll y, char e){cout<<x<<" "<<y<<e;}

int main(){
	ll S; cin>>S;
	ll xa = 1e9, xb = 1, yb = (S+xa-1)/xa, ya = xa*yb - S;
	xy(0,0,' '); xy(xa,ya,' '); xy(xb,yb,'\n');
}