#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
const long long MAXN = 1e6 + 7;
const long long MOD = 1e9 + 7;
const unsigned long long BASE = 311;
const long double EPS = 1e-9;
const long long INF = ((1 << 30) - 1);
const long long INFLL = ((1ll << 62ll) - 1ll);
unsigned long long qpow(unsigned long long x, unsigned long long e) {
  if (!e) return 1;
  if (e & 1) return (qpow(x, e - 1) * x) % MOD;
  return qpow(x * x, e >> 1) % MOD;
}
long long ModInv(long long x, long long y) {
  return (x * qpow(y, MOD - 2)) % MOD;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cout.setf(ios::fixed);
  cout.precision(0);
  long long k;
  cin >> k;
  if (k == 0) {
    cout << 1 << " " << 1;
    cout << "\n";
    cout << 1;
    return 0;
  }
  cout << 3 << " " << 3;
  cout << "\n";
  long long pot = 1 << (31 - __builtin_clz(k) + 1);
  long long sec = pot - k;
  long long Or = pot | k;
  cout << Or << " " << pot << " " << pot;
  cout << "\n";
  cout << k << " " << pot << " " << pot;
  cout << "\n";
  cout << k << " " << Or << " " << k;
  cout << "\n";
  return 0;
}
