#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t, p, i, j, k, m, n;
  cin >> n;
  m = n;
  vector<long long> v;
  while (n > 0) {
    v.push_back(n % 2);
    n = n / 2;
  }
  v.push_back(0);
  long long x = 1, sum = 0;
  for (i = 0; i < v.size(); i++) {
    sum = sum + x;
    x = x * 2;
  }
  long long sum2 = sum ^ m;
  cout << 3 << " " << 3 << endl;
  cout << sum << " " << sum << " " << sum2 << endl;
  cout << sum << " " << m << " " << sum << endl;
  cout << sum2 << " " << sum << " " << m;
}
