#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD=1e9+7;
const int INF=1e9;

int main(){
    ll s;
    cin>>s;
    ll x=(s+INF-1)/INF;
    ll y=x*INF-s;
    cout<<"0 0 "<<1<<" "<<1000000000<<" "<<x<<" "<<y<<endl;
}