#include <bits/stdc++.h>
using namespace std;
int main() {
  int k;
  cin >> k;
  cout << 3 << " " << 3 << endl;
  int x = 1;
  while (x <= k) {
    x = 2 * x;
  }
  int a = x;
  int b = x * 2 - 1;
  cout << b << " " << k << " " << k << '\n';
  cout << b << " " << k << " " << 0 << '\n';
  cout << a << " " << b << " " << k << '\n';
  return 0;
}
