#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
const int M = 1e9 + 7;
const int MOD = 998244353;
const double PI = 3.141592653589793238460;
long long int power(long long int a, long long int b) {
  long long int res = 1;
  if (a == 0) return 0;
  if (a == 1) return 1;
  for (; b > 0; b >>= 1) {
    if (b & 1) res = (res * a);
    if (res > MOD) res %= MOD;
    a = (a * a);
    if (a > MOD) a = a % MOD;
  }
  return res;
}
bool isPrime[10001];
vector<int> prime;
void seive() {
  isPrime[0] = isPrime[1] = 1;
  for (int i = 2; i * i <= 10000; i++) {
    if (!isPrime[i])
      for (int j = i * i; j <= 10000; j += i) {
        isPrime[j] = 1;
      }
  }
  for (int i = 2; i <= 10000; i++)
    if (!isPrime[i]) prime.push_back(i);
}
int lpd[1010];
void pre() {
  for (int i = 1; i <= 1000; i++) lpd[i] = i;
  for (int i = 2; i <= 1000; i++) {
    if (lpd[i] == i) {
      for (int j = i; j <= 1000; j += i) {
        if (lpd[j] == j) lpd[j] = i;
      }
    }
  }
}
int dp[501][501];
int main() {
  int x;
  cin >> x;
  cout << 2 << ' ' << 3 << "\n";
  long long int p = pow(2, 17);
  cout << p + x << ' ' << p << ' ' << 0 << "\n";
  cout << x << ' ' << p + x << ' ' << x << "\n";
}
