#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int k;
  cin >> k;
  int sum = (1 << 18) - 1;
  cout << "3 3\n";
  cout << sum << " " << (1 << 17) << " " << 0 << "\n";
  cout << k << " " << sum << " " << 0 << "\n";
  cout << 0 << " " << k << " " << k << "\n";
  return 0;
}
