#include <bits/stdc++.h>
using namespace std;
long long M = 998244353;
int main() {
  ios::sync_with_stdio(0);
  int t = 1;
  while (t--) {
    int k;
    cin >> k;
    long long x = pow(2, 18) - 1;
    long long y = pow(2, 17);
    long long a[3][2];
    a[0][0] = x;
    a[0][1] = y;
    a[1][0] = y - 1;
    a[1][1] = x;
    a[2][0] = 0;
    a[2][1] = k;
    cout << 3 << " " << 2 << endl;
    for (int i = 0; i < 3; i++) {
      for (int j = 0; j < 2; j++) cout << a[i][j] << " ";
      cout << endl;
    }
  }
  return 0;
}
