#include <bits/stdc++.h>
#pragma GCC optimize("O3")
constexpr auto INF = 9223372036854775807;
using namespace std;
struct custom_hash {
  static uint64_t splitmix64(uint64_t x) {
    x += 0x9e3779b97f4a7c15;
    x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
    x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
    return x ^ (x >> 31);
  }
  size_t operator()(uint64_t x) const {
    static const uint64_t FIXED_RANDOM =
        chrono::steady_clock::now().time_since_epoch().count();
    return splitmix64(x + FIXED_RANDOM);
  }
};
inline long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int mod_power(long long int x, long long int y) {
  long long int res = 1;
  x = x % 1000000007;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % 1000000007;
    y = y >> 1;
    x = (x * x) % 1000000007;
  }
  return res;
}
long long modInverse(long long n) { return mod_power(n, 1000000007 - 2); }
long long nCrModPFermat(long long n, long long int r) {
  if (r == 0) return 1;
  vector<long long int> fac(n + 1, 0);
  fac[0] = 1;
  for (int i = 1; i <= n; i++) fac[i] = (fac[i - 1] * i) % 1000000007;
  return (fac[n] * modInverse(fac[r]) % 1000000007 * modInverse(fac[n - r]) %
          1000000007) %
         1000000007;
}
bool isprime(long long int n) {
  if (n == 2) return true;
  if (n % 2 == 0 || n == 1) {
    return false;
  }
  for (long long int j = 3; j <= sqrt(n); j += 2) {
    if (n % j == 0) {
      return false;
    }
  }
  return true;
}
bool valid(long long int x, long long int y, long long int c1, long long int c2,
           long long int n) {
  if (x + c1 >= 0 && x + c1 < n) {
    if (y + c2 >= 0 && y + c2 < n) {
      return true;
    }
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long int k;
  cin >> k;
  long long int ans = pow(2, 17);
  cout << "2 3" << '\n';
  cout << ans + k << " " << ans << " 0" << '\n';
  cout << k << " " << ans + k << " " << k << '\n';
  return 0;
}
