#include <bits/stdc++.h>
using namespace std;
long long int fast_exp(long long int x, long long int n) {
  long long int ans = 1;
  while (n) {
    if (n & 1) ans *= x;
    n = n >> 1;
    x = x * x;
  }
  return ans;
}
void solve() {
  int k;
  cin >> k;
  long long int x = fast_exp(2, 17);
  cout << 2 << " " << 3 << '\n';
  int a[2][3];
  a[0][0] = x + k, a[0][1] = x, a[0][2] = 0;
  a[1][0] = k, a[1][1] = x + k, a[1][2] = k;
  for (int i = 0; i < 2; i++) {
    for (int j = 0; j < 3; j++) cout << a[i][j] << " ";
    cout << '\n';
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int t = 1;
  while (t--) {
    solve();
    cout << '\n';
  }
}
