#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long k;
  cin >> k;
  cout << 3 << " " << 3 << "\n";
  vector<vector<long long> > arr(3, vector<long long>(3, 0));
  long long l = log2(100000);
  long long m = (1 << (l + 2)) - 1;
  long long x = log2(k);
  x = (1 << (x + 1));
  arr[0][0] = arr[0][1] = arr[1][0] = arr[2][1] = m;
  arr[1][1] = arr[2][2] = k;
  arr[2][0] = x;
  for (long long i = 0; i < 3; i++) {
    for (auto i : arr[i]) cout << i << " ";
    ;
    cout << "\n";
  }
}
