#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vi vector<int>
#define pii pair<int, int>


int main(){
    ll s; cin >> s;
    ll p, q, d, b; p  = q = 0;
    ll c = 1;
    ll a = sqrt(s);
    if (a*a == s) {
        d = a;
    }    
    else {
        d = (s/a)+ 1;

    }
    b =  a * d - s;
    cout << p << " " << q << " " << a << " " << b << " "<< c << " " << d << endl;
}