#include <bits/stdc++.h>
using namespace std;
inline int read() {
  register int t = 0;
  register char v = getchar();
  while (v < '0') v = getchar();
  while (v >= '0') {
    t = (t << 3) + (t << 1) + v - 48;
    v = getchar();
  }
  return t;
}
int main() {
  long long int k;
  cin >> k;
  long long int a = 1 << 17;
  cout << 2 << " " << 3 << endl;
  cout << k + a << " " << k << " 0" << endl;
  cout << a << " " << k + a << " " << k << endl;
  return 0;
}
