#include <iostream>
using namespace std;
const long long N = 1000000000;
int main() {
  long long n; cin >> n;
  printf("0 0 %lld 1 %lld %lld\n", N
         ,(n + N - 1) / N * N - n ,(n + N - 1) / N);
}