#include <bits/stdc++.h>
using namespace std;
string decToBinary(int n) {
  string s;
  for (int i = 31; i >= 0; i--) {
    int k = n >> i;
    if (k & 1)
      s += "1";
    else
      s += "0";
  }
  return s;
}
int main() {
  long long k;
  cin >> k;
  string binary = decToBinary(k);
  cout << "3 4" << endl;
  long long ans[3][4];
  ans[0][0] = 262143;
  ans[0][1] = 131071;
  ans[0][2] = 131071;
  ans[0][3] = 0;
  ans[1][0] = 131072;
  ans[1][1] = 262144;
  ans[1][2] = 131071;
  ans[2][0] = 262143;
  ans[2][1] = 262143;
  ans[2][2] = 262143;
  ans[2][3] = 131071;
  long long p = 131071 - k;
  long long o = p & k;
  long long oo = o & 1;
  ans[1][3] = p;
  long long i, j;
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 4; j++) {
      cout << ans[i][j] << " ";
    }
    cout << endl;
  }
}
