#include <bits/stdc++.h>
using namespace std;
int main() {
  int k, i = 0, j, l;
  cin >> k;
  if (k == 0) {
    cout << 1 << " " << 1 << '\n';
    cout << 1;
    return 0;
  }
  cout << 3 << " " << 3 << '\n';
  while (k >> i) i++;
  i = (1 << i);
  for (j = 1; j <= 3; j++) {
    for (l = 1; l <= 3; l++) {
      if ((j == 1 && l == 3) || (j == 3 && l == 3))
        cout << k << " ";
      else if (j == 1 || l == 3)
        cout << i + k << " ";
      else
        cout << i << " ";
    }
    cout << '\n';
  }
}
