#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int k;
  cin >> k;
  long long int temp = 1 << 17;
  cout << 2 << " " << 3 << '\n';
  cout << temp + k << " " << temp << " " << 0 << '\n';
  cout << k << " " << temp + k << " " << k << '\n';
}
