#include <bits/stdc++.h>
using namespace std;
int k;
const int N = 505;
int a[N][N];
int dp[N][N];
void solve1() {
  int n, m;
  memset(dp, 0, sizeof(dp));
  dp[0][1] = a[1][1];
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      dp[i][j] = max(dp[i - 1][j] & a[i][j], dp[i][j - 1] & a[i][j]);
    }
  }
  cout << dp[n][m] << endl;
}
int main() {
  cin >> k;
  if (k == 0) {
    cout << 1 << " " << 1 << endl;
    cout << 1 << endl;
  } else {
    int temp = 1;
    while (temp <= k) temp <<= 1;
    cout << "2 3" << endl;
    cout << temp + k << " " << k << " " << 0 << '\n';
    cout << temp << " " << temp + k << " " << k << '\n';
  }
  return 0;
}
