#include <bits/stdc++.h>
using namespace std;
long long pw(long long x, long long y) {
  long long ret = 1;
  while (y) {
    if (y % 2) ret = (ret * x) % 1000000007;
    x = (x * x) % 1000000007;
    y /= 2;
  }
  return ret;
}
int main() {
  long long k;
  cin >> k;
  cout << 3 << " " << 3 << endl;
  long long mx = 0;
  for (long long i = 0; i < 20; i++) {
    if (k & (1ll << i)) continue;
    long long tem = mx + (1ll << i);
    if ((tem + k) <= (300000)) {
      mx = tem;
    } else {
      break;
    }
  }
  cout << mx + k << " " << mx << " " << mx << endl;
  cout << k << " " << mx << " " << mx << endl;
  cout << k << " " << mx + k << " " << k << endl;
  return 0;
}
