#include <bits/stdc++.h>
char _;
using namespace std;
void PRINT(int x, int y) {
  for (int i = y - 1; i >= 0; i--) {
    cout << ((0u == (x & (1 << i))) ? 0u : 1u);
  }
  cout << endl;
}
vector<string> vec_splitter(string s) {
  s += ',';
  vector<string> res;
  while (!s.empty()) {
    res.push_back(s.substr(0, s.find(',')));
    s = s.substr(s.find(',') + 1);
  }
  return res;
}
void debug_out(vector<string> __attribute__((unused)) args,
               __attribute__((unused)) int idx,
               __attribute__((unused)) int LINE_NUM) {
  cerr << endl;
}
template <typename Head, typename... Tail>
void debug_out(vector<string> args, int idx, int LINE_NUM, Head H, Tail... T) {
  if (idx > 0)
    cerr << ", ";
  else
    cerr << "Line(" << LINE_NUM << ") ";
  stringstream ss;
  ss << H;
  cerr << args[idx] << " = " << ss.str();
  debug_out(args, idx + 1, LINE_NUM, T...);
}
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  int k;
  cin >> k;
  cout << 3 << " " << 3 << "\n";
  int ans[10][10] = {0};
  ans[0][0] = (1 << 18) - 1;
  ans[1][0] = (1 << 17);
  ans[2][0] = 0;
  ans[0][1] = k;
  ans[0][2] = 0;
  ans[1][1] = k + (1 << 17);
  ans[1][2] = ans[2][1] = ans[2][2] = k;
  for (int x = 0; x < 3; x++) {
    for (int i = 0; i < 3; i++) {
      cout << ans[x][i] << " ";
    }
    cout << "\n";
  }
  cout << "\n";
  return 0;
}
