#include <bits/stdc++.h>
using namespace std;
int main() {
  int k;
  scanf("%d", &k);
  if (k == 0) {
    printf("1 1\n");
    printf("%d\n", 1);
    return 0;
  }
  int m = log2(k) + 1;
  printf("3 3\n");
  int I = 262143;
  vector<vector<int> > a(3, vector<int>(3, I));
  a[0][2] = (1 << m);
  a[1][1] = (1 << m) - 1;
  a[2][0] = a[2][1] = 0;
  a[2][2] = k;
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j < 3; j++) printf("%d ", a[i][j]);
    printf("\n");
  }
  return 0;
}
