#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T>
using V = vector<T>;
template <class T, class U>
using P = pair<T, U>;
using vll = V<ll>;
using vvll = V<vll>;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
const ll MOD = 1000000007;
const ll HIGHINF = (ll)1e18;
const int INF = 1e9;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int k;
  cin >> k;
  cout << 3 << ' ' << 4 << '\n';
  int bit = 0;
  int origk = k;
  while (k > 0) {
    bit++;
    k >>= 1;
  }
  k = origk;
  V<V<int> > ans(3, V<int>(4, 0));
  ans[2][3] = k;
  ans[1][0] = 1 << bit;
  ans[0][1] = ans[0][2] = ans[1][2] = k;
  ans[0][0] = ans[2][0] = ans[2][1] = ans[2][2] = (1 << bit) | k;
  for (int i = 0; i < 3; i++) {
    cout << ans[i][0] << ' ' << ans[i][1] << ' ' << ans[i][2] << ' '
         << ans[i][3] << '\n';
  }
  return 0;
}
