#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long k;
  cin >> k;
  long long r = 1;
  while (r <= k) {
    r *= 2;
  }
  vector<vector<long long> > ans;
  ans = {{r + k, 0, 0}, {r + k, k, 0}, {r, r + k, k}};
  cout << "3 3\n";
  for (long long i = 0; i < 3; ++i) {
    for (long long j = 0; j < 3; ++j) {
      cout << ans[i][j] << " ";
    }
    cout << "\n";
  }
}
