#include <bits/stdc++.h>
using namespace std;
int main() {
  int k;
  while (scanf("%d", &k) > 0) {
    int a[3][3];
    memset(a, 0, sizeof a);
    a[0][0] = a[2][1] = (1 << 17) + k;
    a[0][1] = a[1][1] = (1 << 17);
    a[1][0] = a[2][0] = a[2][2] = k;
    printf("3 3\n");
    for (int i = 0; i < 3; i++) {
      for (int j = 0; j < 3; j++) {
        if (j) printf(" ");
        printf("%d", a[i][j]);
      }
      printf("\n");
    }
  }
}
