#include <bits/stdc++.h>
using namespace std;
int k, i;
int main() {
  cin >> k;
  for (i = 1; i <= k; i <<= 1) {
  }
  cout << "2 3" << endl;
  cout << i * 2 - 1 << " " << k << " 0" << endl;
  cout << i << " " << i * 2 - 1 << " " << k << endl;
  return 0;
}
