#include <bits/stdc++.h>
using namespace std;
signed main() {
  int k;
  cin >> k;
  int a = (1 << 17) + k;
  int f = (1 << 17);
  cout << 3 << " " << 3 << endl;
  cout << a << " " << a << " " << a << endl;
  cout << a - (1 << 17) << " " << (1 << 17) << " " << (1 << 17) << endl;
  cout << a - (1 << 17) << " "
       << " " << (1 << 17) + (1 << 17) - 1 << " " << (1 << 17) - 1;
}
