#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int k;
  cin >> k;
  int p = 1;
  while (p <= k) {
    p *= 2;
  }
  int x = k + p;
  int y = p;
  vector<vector<int>> ans = {{x, x, k}, {x, y, x}, {k, x, k}};
  cout << "3 3\n";
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j < 3; j++) {
      cout << ans[i][j];
      if (j + 1 < 3) {
        cout << " ";
      }
    }
    cout << "\n";
  }
}
