#include <bits/stdc++.h>
using namespace std;
int custom_pow(int a, int n) {
  int res = 1;
  while (n--) {
    res *= a;
  }
  return res;
}
int main() {
  int k;
  cin >> k;
  auto a = bitset<30>(k);
  auto k_string = a.to_string();
  int idx = 0;
  for (int i = 0; i < k_string.size(); i++) {
    if (k_string[i] == '1') {
      idx = 30 - i;
      break;
    }
  }
  int a_1 = custom_pow(2, idx) + k;
  int a_3 = custom_pow(2, idx);
  cout << 3 << " " << 3 << endl;
  cout << a_1 << " " << a_3 << " " << a_3 << endl;
  cout << k << " " << a_1 << " " << k << endl;
  cout << 0 << " " << 0 << " " << k << endl;
  return 0;
}
