#include <bits/stdc++.h>
using namespace std;
int main() {
  int k;
  scanf("%d", &k);
  int n = 1;
  while (n <= k) n <<= 1;
  printf("3 3\n");
  printf("%d %d %d\n", n | (n - 1), n - 1, 0);
  printf("%d %d %d\n", n, k, 0);
  printf("%d %d %d\n", n | (n - 1), n | (n - 1), k);
  return 0;
}
