#include <bits/stdc++.h>
using namespace std;
long long int modadd(long long int n, long long int m, long long int mod) {
  long long int sum = ((n + m) % mod + mod) % mod;
  return sum;
}
long long int modsub(long long int n, long long int m, long long int mod) {
  long long int diff = ((n - m + mod) % mod + mod) % mod;
  return diff;
}
long long int modpro(long long int n, long long int m, long long int mod) {
  long long int pro = ((n * m) % mod + mod) % mod;
  return pro;
}
long long int powmod(long long int x, long long int y, long long int mod) {
  x %= mod;
  y %= mod;
  long long int res = 1;
  while (y > 0) {
    if (y & 1) res = modpro(res, x, mod);
    y = y >> 1;
    x = modpro(x, x, mod);
  }
  return res;
}
long long int moddiv(long long int n, long long int m, long long int mod) {
  long long int a = powmod(m, mod - 2, mod);
  long long int res = modpro(a, n, mod);
  return res;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long int k;
  cin >> k;
  cout << 3 << " " << 3 << "\n";
  long long int a[3][3];
  for (long long int i = 0; i < 3; i++) {
    for (long long int j = 0; j < 3; j++) {
      a[i][j] = 0;
    }
  }
  long long int r = k;
  vector<long long int> b;
  while (k > 0) {
    b.push_back(k % 2);
    k /= 2;
  }
  long long int d = 0;
  long long int c = powmod((long long int)2, b.size() + 1, 998244353) - 1;
  b.push_back(0);
  for (long long int i = 0; i < b.size(); i++) {
    d += (1 - b[i]) * powmod((long long int)2, i, 998244353);
  }
  a[0][0] = c;
  a[1][0] = c;
  a[0][1] = c;
  a[2][1] = c;
  a[1][2] = c;
  a[0][2] = r;
  a[2][0] = r;
  a[2][2] = r;
  a[1][1] = d;
  for (long long int i = 0; i < 3; i++) {
    for (long long int j = 0; j < 3; j++) {
      cout << a[i][j] << " ";
    }
    cout << ""
         << "\n";
  }
  return 0;
}
