#include <bits/stdc++.h>
using namespace std;
bool sortbysec(const pair<long long, long long> &a,
               const pair<long long, long long> &b) {
  return (a.second < b.second);
}
long long nod(long long n) {
  string s = to_string(n);
  return (long long)s.length();
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long x = 1;
  while (x <= 1e5) x *= 2;
  long long k;
  cin >> k;
  cout << 3 << " " << 3 << "\n";
  long long a[3][3] = {x + k, x, x, k, x, x, k, x + k, k};
  for (long long i = 0; i < 3; i++)
    for (long long j = 0; j < 3; j++)
      cout << a[i][j] << " " << (j == 2 ? "\n" : "");
}
