#include <bits/stdc++.h>
using namespace std;
long long int fast(long long int n, long long int a, long long int m) {
  if (n == 0)
    return 1;
  else if (n == 1)
    return a;
  else {
    long long int r = fast(n / 2, a, m);
    if (n % 2 == 0) {
      return (((r % m) * (r % m)) % m);
    } else {
      return (((((r % m) * a) % m) * r) % m);
    }
  }
}
int ckck(int a, int b, int c) {
  if (a >= b && a <= c)
    return 1;
  else
    return 0;
}
int main() {
  long long int K;
  cin >> K;
  long long int d = fast(17, 2, 1e9);
  cout << 2 << " " << 3 << "\n";
  cout << d + K << " " << d << " " << 0 << "\n";
  cout << K << " " << d + K << " " << K;
}
