#include <bits/stdc++.h>
using namespace std;
int static_init = []() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout << fixed;
  return 0;
}();
int main() {
  int k;
  cin >> k;
  cout << "2 3" << endl;
  int x = 1;
  while (x <= k) x <<= 1;
  cout << (x | k) << ' ' << k << " 0" << endl
       << x << ' ' << (x | k) << ' ' << k << endl;
  return 0;
}
