#include <bits/stdc++.h>
using namespace std;

int main() {
  long long int s;
  cin>>s;
  
  long long int Y3=(s-(s%1000000000))/1000000000+1;
    if(s%1000000000==0){
    Y3-=1;
  }
  long long int X2=1000000000*Y3-s;
  
  
  cout<<"0 0 1000000000 "<<X2<<" 1 "<<Y3<<endl;
 }