#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void JAISHREERAM() {
  long long int k, n, m, i, j, ans = 0;
  cin >> k;
  if (k == 0) {
    cout << "1 1\n1";
    return;
  }
  cout << "2 3\n";
  cout << ((1 << 17) + k) << " " << k << " " << 0 << '\n';
  cout << (1 << 17) << " " << ((1 << 17) + k) << " " << k << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  int T = 1;
  for (int t = 1; t <= T; t++) {
    JAISHREERAM();
  }
  return 0;
}
