#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, t;
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int k;
  cin >> k;
  int all = k + (1 << 17);
  int arr[3][3];
  arr[0][0] = all;
  arr[0][1] = k;
  arr[0][2] = 0;
  arr[1][0] = (1 << 17);
  arr[1][1] = all;
  arr[1][2] = k;
  arr[2][0] = 0;
  arr[2][1] = k;
  arr[2][2] = k;
  cout << "3 3\n";
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) cout << arr[i][j] << " ";
    cout << '\n';
  }
  return 0;
}
