#include <iostream>
#include <stdio.h>
#include <stdlib.h> //rand() 0~RAND_MAX2147483647
#include <math.h>
#include <time.h>   //srand((unsigned int)time(NULL));
#include <unistd.h> //sleep
#include <algorithm>
#include <cmath>
#include <vector>
#include <regex> //正規表現
#include <map>
#include <set>
#include <cassert> //assart
#include <numeric>
#include <iterator>
#include <list>

using namespace std;
#define ll long long int
#define FOR(i,min,max) for(int i=(min);i<(max);i++)
#define FOReq(i,min,max) for(int i=(min);i<=(max);i++)
#define FORREV(i,max,min) for(int i=(max)-1;i>=(min);i--)
#define FORREVeq(i,max,min) for(int i=(max);i>=(min);i--)
const int MOD=1e9+7;
const int INF=2000000001;
const ll INFll=2e18;
//const int MAX_V=10000;
const double  Micro=1e-5;

int UnUsedVariable(){
    if(INF || Micro || MOD || INFll){;}
    return 0;
}

#define pf printf
#define sf scanf
#define inarray(array,min,max) FOR(i,min,max){cin>>array[i];}
#define inarrayW(arrayA,arrayB,min,max) FOR(i,min,max){cin>>arrayA[i]>>arrayB[i];}
#define br printf("\n");
#define OutputAndReturn0(x) {cout<<(x)<<endl;return 0;}

#define issame(a,b,c,d) ((a)==(b) and (b)==(c) and (c)==(d))
#define isdiff3(a,b,c) ((a)!=(b) and (b)!=(c) and (c)!=(a))
#define isdiff4(a,b,c,d) ((a)!=(b) and (b)!=(c) and (c)!=(a) and (d)!=(a) and (d)!=(b) and (d)!=(c))
inline int isEven(int x){return x%2==0;}
inline int isOdd (int x){return x%2==1;}
inline ll  gcd(ll a,ll b){ if(b==0)return a;else return gcd(b,a%b);}//最大公約数 なお一方が0なら答えは他方になるので番兵は０で良い また、負の数もOK -4%3=-1となるため
inline ll  lcm(ll a,ll b){return a*b/gcd(a,b);}//MODやオーバーフローには注意！



//Eと名のつくのはデバッグ用！
int EintN(int array[],const int num){
    for(int i=0;i<num;i++){cerr<<array[i]<<" ";}
    br;
    return 0;
}
int EintNN(const int heighth,const int width,int array[heighth][width]){
    FOR(i, 0, heighth){
        FOR(k, 0, width){
            {cerr<<array[i][k]<<" ";}
        }
        br;
    }
    br;
    return 0;
}
int Eint(string str,const int num){
    cerr<<str<<" is "<<num<<" now."<<endl;
    return 0;
}
int NumToArray(int number,int array[],int arraymax,int whatnary){//0~7を000~111にするみたいな　0~26を000~222にするみたいな
    int newnumber=number;
    FOR(i, 0, arraymax){
        array[i]=newnumber%whatnary;
        newnumber=newnumber/whatnary;
    }
    return 0;
}





int Ap(){
    int ans;ans=0;
    ll S;cin>>S;
    ll x1,x2,x3,y1,y2,y3;
    x1=y1=0;
    ll x3y2=(ll)1e9-(S % (ll)(1e9));
    ll x2y3=S/(ll)1e9 +1;
    x2=(ll)1e9;y3=x2y3;
    y2=1;x3=x3y2;
    if(S>((ll)1e18-(ll)1e9)){
        ll dif=(ll)1e18 -S;
        x2=1e9;
        y3=1e9;
        x3=1;
        y2=dif;
    }
    
    
    cout<<x1<<" "<<y1<<" "<<x2<<" "<<y2<<" "<<x3<<" "<<y3<<endl;
    //OutputAndReturn0(ans);
    return 0;
}

int Bp(){
    int ans;ans=0;
    
    OutputAndReturn0(ans);
    return 0;
}

int Cp(){
    int ans;ans=0;
    
    OutputAndReturn0(ans);
    return 0;
}

int Dp(){
    int ans;ans=0;
    
    OutputAndReturn0(ans);
    return 0;
}


long long IntPow(long long x, long long n){
    if(n == 0)
        return 1;
    if(n % 2 == 0)
        return IntPow(x * x, n / 2);
    else
        return x * IntPow(x, n - 1);
}


int test(){
    int a[3];
    FOR(i, 0, 8){
        NumToArray(i, a, 3, 2);
        EintN(a, 3);
    }
    
    return 0;
}

signed main(){
    //test();
    Ap();
    //Bp();
    //Cp();
    //Dp();
    return 0;
}


Measured memory_bytes: 888