#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const int inf = 1e9 + 10;
const long long INF = 1e18;
const long double EPS = 1e-10;
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
const int M = 262143;
int main() {
  int k;
  cin >> k;
  if (k == 0) {
    cout << 1 << " " << 1 << '\n' << 0 << '\n';
  } else {
    cout << 3 << " " << 3 << endl;
    vector<vector<int>> ans = {{M, k, 0}, {M - k, k, 0}, {M - k, M, k}};
    for (int i = 0; i < (3); ++i) {
      for (int j = 0; j < (3); ++j) {
        cout << ans[i][j] << (j == 2 ? '\n' : ' ');
      }
    }
  }
  return 0;
}
