#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1e6 + 10;
const long long inf = 0x3f3f3f3f3f3f;
const long long mod = 1e9 + 7;
long long qsm(long long a, long long b, long long mod) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = ans * a % mod;
    b /= 2;
    a = a * a % mod;
  }
  return ans;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long T, n, m;
long long a1[maxn], a2[maxn], a3[maxn];
vector<int> q[maxn];
int a[13] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31};
long long c[30];
int main() {
  T = 1;
  while (T--) {
    cin >> n;
    int g = 0;
    int k = 0;
    int temp = n;
    while (temp) {
      if (temp % 2 == 0) {
        g += 1 << k;
      }
      k++;
      temp /= 2;
    }
    int i = 1;
    while (i <= n) i *= 2;
    g += i;
    cout << 2 << " " << 3 << endl;
    cout << (i * 2 - 1) << " " << n << " " << 0 << endl;
    cout << g << " " << (i * 2 - 1) << " " << n << endl;
  }
  return 0;
}
