#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
using namespace std;
const int MAXN = 1000002;
const int MOD2 = 998244353;
const int MOD = 1000000007;
const int INF = 1e8;
const long double EPS = 1e-7;
long long int mul(long long int x, long long int y) {
  return (x * 1ll * y) % MOD;
}
long long int fastpow(long long int x, long long int y) {
  long long int z = 1;
  while (y) {
    if (y & 1) z = mul(z, x);
    x = mul(x, x);
    y >>= 1;
  }
  return z;
}
int main(int argc, char** argv) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  cout << setprecision(20);
  {
    long long int k = 1;
    while (k < 300000) k *= 2;
    k /= 2;
    k--;
    long long int n;
    cin >> n;
    long long int ans[3][3];
    for (int i = 0; i < (int)3; i++)
      for (int j = 0; j < (int)3; j++) ans[i][j] = k;
    ans[2][2] = n;
    ans[2][0] = (n ^ k);
    ans[0][2] = (n ^ k);
    ans[1][1] = (n);
    cout << 3 << " " << 3 << "\n";
    for (int i = 0; i < (int)3; i++) {
      for (int j = 0; j < (int)3; j++) cout << ans[i][j] << " ";
      cout << "\n";
    }
  }
  return 0;
}
