#include <bits/stdc++.h>
using namespace std;
int dp[500][500];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int k, fir = 0;
  cin >> k;
  int bit[20] = {0};
  int po[20];
  po[0] = 1;
  for (int i = 1; i < 20; i++) po[i] = 2 * po[i - 1];
  for (int i = 0; i < 20; i++)
    if (k & (1 << i)) bit[i] = 1;
  for (int i = 19; i >= 0; i--)
    if (bit[i]) {
      fir = i;
      break;
    }
  int a, b, c, d, e, f;
  a = po[fir + 1];
  d = a;
  a += k;
  b = k;
  c = 0;
  e = a;
  f = k;
  cout << 2 << ' ' << 3 << endl;
  cout << a << ' ' << b << ' ' << c << endl;
  cout << d << ' ' << e << ' ' << f << endl;
}
