#include <iostream>
using namespace std;
typedef long long ll;
ll m=1e9;

int main(){
  ll n;
  cin >> n;
  cout << 0 << ' ' << 0 << ' ' << (n-1)/m+1 << ' ' << 1 << ' ' << ((n-1)/m+1)*m-n << ' ' << m <<endl; 
}
