#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long k, i, j;
  cin >> k;
  cout << "3 4\n";
  long long a[3][4], x = 0, ck = k;
  while (ck) {
    ck >>= 1;
    x++;
  }
  long long v = (1 << x);
  x = (1 << x) + k;
  cout << x << " " << k << " " << k << " " << 0 << "\n";
  cout << v << " " << 0 << " " << k << " " << 0 << "\n";
  cout << x << " " << x << " " << x << " " << k << "\n";
  return 0;
}
