#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
template <typename T>
void chkmin(T &x, T y) {
  if (y < x) x = y;
}
template <typename T>
void chkmax(T &x, T y) {
  if (y > x) x = y;
}
template <typename T>
void upd(T &x, T y) {
  if ((x += y) >= mod) x -= mod;
}
int n, m, K, N, sl, fh, a[510][510];
int rd() {
  sl = 0;
  fh = 1;
  char ch = getchar();
  while (ch < '0' || '9' < ch) {
    if (ch == '-') fh = -1;
    ch = getchar();
  }
  while ('0' <= ch && ch <= '9') sl = sl * 10 + ch - '0', ch = getchar();
  return sl * fh;
}
int main() {
  ios::sync_with_stdio(false);
  K = rd();
  for (N = 1; N <= K; N <<= 1)
    ;
  a[1][1] = a[1][2] = a[1][3] = (N << 1) - 1;
  a[3][1] = a[3][2] = a[3][3] = (N << 1) - 1;
  a[2][3] = a[3][4] = K;
  a[2][1] = N;
  a[2][2] = N << 1;
  n = 3;
  m = 4;
  printf("%d %d\n", n, m);
  for (int i = 1; i <= n; ++i, puts(""))
    for (int j = 1; j <= m; ++j) printf("%d ", a[i][j]);
  return 0;
}
