#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 7;
long long INF = 1e9 + 7;
long long n;
int main(int argc, char const *argv[]) {
  cin >> n;
  long long t = (1 << 17);
  cout << 3 << " " << 4 << endl;
  cout << t + n << " " << t << " " << t << " " << 0 << endl;
  cout << n << " " << 0 << " " << t << " " << 0 << endl;
  cout << n << " " << n << " " << t + n << " " << n << endl;
  return 0;
}
