#include <bits/stdc++.h>
using namespace std;
int sol[4][4];
int N = 3;
int main() {
  int K;
  cin >> K;
  sol[1][1] = (1 << 17) + K;
  sol[1][2] = (1 << 17);
  sol[2][1] = K;
  sol[2][2] = (1 << 17) + K;
  sol[2][3] = K;
  sol[3][3] = K;
  printf("3 3\n");
  for (int i = 1; i <= N; i++) {
    for (int j = 1; j <= N; j++) printf("%d ", sol[i][j]);
    printf("\n");
  }
  return 0;
}
