#include <stdio.h>  
#include <algorithm>  
#include <assert.h>
#include <bitset>
#include <cmath>  
#include <complex>  
#include <deque>  
#include <functional>  
#include <iostream>  
#include <limits.h>  
#include <map>  
#include <math.h>  
#include <queue>  
#include <set>  
#include <stdlib.h>  
#include <string.h>  
#include <string>  
#include <time.h>  
#include <unordered_map>  
#include <unordered_set>  
#include <vector>  
#include <chrono>
#include <random>
#include <time.h>
#include <fstream>
#define ll long long
#define rep2(i,a,b) for(ll i=a;i<=b;++i)
#define rep(i,n) for(ll i=0;i<n;i++)
#define rep3(i,a,b) for(ll i=a;i>=b;i--)
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pq priority_queue<int>
#define pqg priority_queue<int,vector<int>,greater<int>>
#define pb push_back
#define vec vector<int>
#define vecll vector<ll>
#define vecpii vector<pii>
#define endl "\n"
#define all(c) begin(c),end(c)
using namespace std;
int in() {int x;scanf("%d",&x);return x;}
ll lin() {ll x;scanf("%lld",&x);return x;}

#define INF 1e9+7
#define LLINF 1e18+7
#define N 250000
ll MOD=998244353;

template <std::uint_fast64_t Modulus> class modint {
  using u64 = std::uint_fast64_t;

public:
  u64 a;

  constexpr modint(const u64 x = 0) noexcept : a(x % Modulus) {}
  constexpr u64 &value() noexcept { return a; }
  constexpr const u64 &value() const noexcept { return a; }
  constexpr modint operator+(const modint rhs) const noexcept {
    return modint(*this) += rhs;
  }
  constexpr modint operator-(const modint rhs) const noexcept {
    return modint(*this) -= rhs;
  }
  constexpr modint operator*(const modint rhs) const noexcept {
    return modint(*this) *= rhs;
  }
  constexpr modint operator/(const modint rhs) const noexcept {
    return modint(*this) /= rhs;
  }
  constexpr modint &operator+=(const modint rhs) noexcept {
    a += rhs.a;
    if (a >= Modulus) {
      a -= Modulus;
    }
    return *this;
  }
  constexpr modint &operator-=(const modint rhs) noexcept {
    if (a < rhs.a) {
      a += Modulus;
    }
    a -= rhs.a;
    return *this;
  }
  constexpr modint &operator*=(const modint rhs) noexcept {
    a = a * rhs.a % Modulus;
    return *this;
  }
  constexpr modint &operator/=(modint rhs) noexcept {
    u64 exp = Modulus - 2;
    while (exp) {
      if (exp % 2) {
        *this *= rhs;
      }
      rhs *= rhs;
      exp /= 2;
    }
    return *this;
  }
};

using mint = modint<99824435>;

vector<vector<ll> > mem(600,vector<ll>(600));
vector<int> v;
ll dfs(int x,int y){
    if(x<0||y<0)return 1ll;
    if(mem[x][y]!=0)return mem[x][y];
    if(x>=y)return 1ll;
    pii p={INF,0};
    rep2(i,x,y)if(v[i]<p.first){p={v[i],i};}
    ll ansl=0,ansr=0;
    rep2(i,x,p.second){
        ansl+=dfs(x,i-1)*dfs(i,p.second-1)%MOD;
        ansl%=MOD;
        //if(x==0&&y==2)cout<<dfs(x,i-1).a<<" "<<dfs(i,p.second-1).a<<endl;
    }
    rep2(i,p.second,y){
        ansr+=dfs(p.second+1,i)*dfs(i+1,y)%MOD;
        ansr%=MOD;
    }
    //cout<<x<<y<<" "<<ansl.a<<" "<<ansr.a<<endl;
    return mem[x][y]=ansl*ansr%MOD;
}
main(){
    ll s=lin();
    ll l=0,r=INF;
    while(l<r-1){
       ll mid=(l+r)/2;
       if(mid*mid>=s){
         r=mid;
       }
       else l=mid;
    }
    ll mid=r;
    if(mid*mid-s>1000000000){
      cout<<0<<" "<<0<<" "<<mid<<" "<<(mid*(mid-1))-s<<" "<<1<<" "<<mid-1<<endl;
    }
    else{
      cout<<0<<" "<<0<<" "<<mid<<" "<<mid*mid-s<<" "<<1<<" "<<mid<<endl;
    }
}



Measured memory_bytes: 3072