#include <bits/stdc++.h>
using namespace std;
bool isPrime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i += 6) {
    if ((n % i == 0) || (n % (i + 2) == 0)) return false;
  }
  return true;
}
int32_t main() {
  long long k;
  cin >> k;
  if (k == 0) {
    cout << "1"
         << " "
         << "1"
         << "\n";
    cout << "5";
    return 0;
  }
  cout << "2"
       << " "
       << "3"
       << "\n";
  long long x = (long long)(pow(2, 17));
  cout << x + k << " " << x << " "
       << "0"
       << "\n";
  cout << k << " " << x + k << " " << k << "\n";
}
