#include <bits/stdc++.h>
using namespace std;
const int maxn = 1001;
const int INF = 2 * 1e9;
const long long MOD = 998244353;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int k;
  cin >> k;
  int b = 0;
  while ((1 << b) < 3 * 1e5) b++;
  b -= 2;
  int ik = 0;
  for (int i = 0; i <= b; ++i) {
    if ((k & (1 << i)) == 0) {
      ik += (1 << i);
    }
  }
  int u = (1 << (b + 1)) - 1;
  cout << 3 << ' ' << 3 << "\n";
  cout << u << ' ' << ik << ' ' << u << "\n";
  cout << k << ' ' << u << ' ' << u << "\n";
  cout << u << ' ' << u << ' ' << k << "\n";
  return 0;
}
