#include <bits/stdc++.h>
using namespace std;
int main() {
  long long k;
  cin >> k;
  long long a[2][3];
  a[0][0] = 262143;
  a[0][1] = 131072;
  a[0][2] = 0;
  a[1][0] = k;
  a[1][1] = a[0][0];
  a[1][2] = (a[0][0] >> 1);
  cout << "2 3\n";
  for (int i = 0; i < 2; i++) {
    for (int j = 0; j < 3; j++) cout << a[i][j] << " ";
    cout << "\n";
  }
  return 0;
}
