#include<bits/stdc++.h>
using namespace std;
#define M 1000000000
#define Smax 1000000000000000000
int main(){
  long S;cin>>S;
  if(S==Smax)cout<<"0 0 0 1000000000 1000000000 1000000000";
  else cout<<"0 0 1 1000000000 "<<S/M+1<<" "<<M-S%M;
}