#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using namespace std;
int k, ans[4][4];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int mx = (1 << 18) - 1;
  cin >> k;
  int bob = mx - k;
  ans[1][1] = mx;
  ans[1][2] = mx - (1 << 17);
  ans[1][3] = 0;
  ans[2][1] = mx - k;
  ans[2][2] = mx;
  ans[2][3] = mx - (1 << 17);
  cout << "2 3\n";
  for (int i = (1); i <= (2); ++i)
    for (int j = (1); j <= (3); ++j) cout << ans[i][j] << " \n"[j == 3];
  return 0;
}
