#include <bits/stdc++.h>
using namespace std;
int main() {
  int k;
  cin >> k;
  cout << 3 << ' ' << 4 << '\n';
  int bit;
  for (int i = 0; i <= 18; i++)
    if (!(k & (1 << i))) {
      bit = i;
      break;
    }
  int cevaDinAns = (1 << bit);
  int realAns = cevaDinAns + k;
  int cevaDinFull;
  int svBit;
  for (int i = 0; i <= 18; i++)
    if ((1 << i) > realAns) {
      cevaDinFull = (1 << i);
      svBit = i;
      break;
    }
  int blooper = cevaDinFull << 1;
  int fullBit = cevaDinFull;
  for (int i = svBit - 1; i >= 0; i--) fullBit ^= (1 << i);
  cout << fullBit << ' ' << realAns << ' ' << realAns << ' ' << 0 << '\n';
  cout << cevaDinFull << ' ' << blooper << ' ' << realAns << ' ' << cevaDinAns
       << '\n';
  cout << fullBit << ' ' << fullBit << ' ' << fullBit << ' ' << realAns << '\n';
  return 0;
}
