#include <bits/stdc++.h>
using namespace std;
long long hell = 1e9L + 7;
long long powe(long long x, long long y) {
  long long res = 1;
  x = x % hell;
  while (y > 0) {
    if (y & 1) res = (res * x) % hell;
    y = y >> 1;
    x = (x * x) % hell;
  }
  return res;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long tests = 1;
  while (tests--) {
    long long k;
    cin >> k;
    if (k == 0) {
      cout << "1 1" << '\n';
      cout << 300000;
      return 0;
    }
    cout << "2 3" << '\n';
    long long j = 1;
    while (powe(2, j) <= k) j++;
    cout << powe(2, j) + k << " " << k << " 0" << '\n';
    cout << powe(2, j) << " " << powe(2, j) + k << " " << k << '\n';
  }
  return 0;
}
