#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <typename T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return 0;
}
template <typename T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return 0;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int K;
  cin >> K;
  int tmp = K;
  int cnt = 0;
  while (tmp > 0) {
    tmp /= 2;
    ++cnt;
  }
  vector<vector<int>> mat(2, vector<int>(3));
  mat[0][0] = mat[0][2] = mat[1][1] = (1 << (cnt + 1)) - 1;
  mat[1][0] = mat[1][2] = K;
  mat[0][1] = 1 << cnt;
  cout << "2 3" << endl;
  for (int i = (int)0; i < (int)2; ++i) {
    for (int j = (int)0; j < (int)3; ++j) {
      cout << mat[i][j] << ' ';
    }
    cout << endl;
  }
  return 0;
}
