#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int k;
  cin >> k;
  cout << 3 << " " << 3 << endl;
  long long int x = pow(2, 17);
  cout << x + k << " " << x + k << " " << k + x << endl;
  cout << x << " " << k << " " << x << endl;
  cout << x << " " << k + x << " " << k << endl;
  return 0;
}
