#include <bits/stdc++.h>
using namespace std;
int main() {
  int k;
  scanf("%d", &k);
  int v = ceil(log2(k + 1));
  int b = 1 << v;
  int a = b + k;
  printf("2 3\n");
  printf("%d %d %d\n", a, k, 0);
  printf("%d %d %d\n", b, a, k);
  return 0;
}
