#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int k;
  cin >> k;
  int p1 = (1 << 17);
  int p2 = -1;
  for (int i = 0; i < 32; i++)
    if ((k & (1 << i)) == 0) {
      p2 = (1 << i);
      break;
    }
  cout << "3 3\n";
  cout << p1 + p2 + k << ' ' << p2 + k << ' ' << p2 << '\n';
  cout << p1 << ' ' << p2 + k << ' ' << p2 << '\n';
  cout << p1 + p2 + k << ' ' << p1 + p2 + k << ' ' << p2 + k << '\n';
}
