#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll inf = 1e18;
const ll l = 1e8;
int main() {
  ll k;
  cin >> k;
  cout << 3 << ' ' << 3 << '\n';
  ll now = 1 << 17;
  ll cur = now - 1;
  ll ans = now | cur;
  ll rem = cur - k;
  cout << ans << ' ' << cur << ' ' << rem << '\n';
  cout << now << ' ' << cur << ' ' << rem << '\n';
  cout << now << ' ' << ans << ' ' << cur << '\n';
  return 0;
}
