#include <bits/stdc++.h>
using namespace std;
int main() {
  long long k;
  cin >> k;
  vector<long long> foo;
  long long c = k;
  while (k) {
    foo.push_back(k % 2);
    k /= 2;
  }
  foo.push_back(0);
  long long a = 0, b = 0, i = 0;
  for (; i < foo.size(); i++) {
    a += (1 << i);
    if (foo[i] == 0) b += (1 << i);
  }
  cout << 3 << " " << 3 << "\n";
  cout << a << " " << a << " " << b << "\n";
  cout << a << " " << c << " " << a << "\n";
  cout << b << " " << a << " " << c << "\n";
}
