#include <bits/stdc++.h>
using namespace std;
const long long MAX = -1000000000000000000;
const long long MIN = 1000000000000000000;
const long long inf = 1000000000;
const long long KOK = 100000;
const long long LOG = 30;
const long long li = 500005;
const long long mod = 1000000007;
long long n, m, b[li], a[li], k, flag, t, dp[5][5];
long long cev;
string s;
vector<long long> v;
int32_t main(void) {
  scanf("%lld", &n);
  dp[1][1] = (1ll << 17) + n;
  dp[1][2] = (1ll << 17);
  dp[2][1] = n;
  dp[2][2] = (1ll << 17) + n;
  dp[2][3] = n;
  printf("2 3\n");
  for (long long i = 1; i <= 2; i++) {
    for (long long j = 1; j <= 3; j++) printf("%lld ", dp[i][j]);
    printf("\n");
  }
  return 0;
}
