#include <bits/stdc++.h>
using namespace std;
const int maxn = 1005;
const int mod = 1e9 + 7;
const int INF = 0x3f3f3f3f;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int a[maxn][maxn];
int main() {
  int k;
  cin >> k;
  int big = (1 << 17);
  a[1][1] = (1 << 18) - 1;
  a[1][2] = big;
  a[1][3] = big;
  a[2][1] = k;
  a[2][2] = (1 << 17) + k;
  a[2][3] = k;
  cout << 2 << ' ' << 3 << endl;
  for (int i = (1); i <= (2); i++) {
    for (int j = (1); j <= (3); j++) cout << a[i][j] << ' ';
    cout << endl;
  }
  return 0;
}
