#include <bits/stdc++.h>
using namespace std;
#define ll unsigned long long
ll m = 1000000000;
int main(){
  ll s;
  cin>>s;
  ll x=(m-s%m)%m;
  ll y=(s+x)/m;
  cout<<"0 0 1000000000 1 "<<x<<" "<<y<<endl;
}