#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
class DWalkOnMatrix {
 public:
  void solve(std::istream& in, std::ostream& out) {
    long long int k;
    in >> k;
    out << 3 << " " << 3 << "\n";
    out << (1 << 18) - 1 << " " << k << " " << 0 << "\n"
        << (1 << 17) << " " << (1 << 18) - 1 << " " << 0 << "\n"
        << k << " " << k << " " << k << "\n";
  }
};
int main() {
  DWalkOnMatrix solver;
  std::ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solver.solve(in, out);
  return 0;
}
