#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int x = 262143;
int y = 131072;
void solve() {
  int k;
  cin >> k;
  int a[3][4];
  a[0][0] = x;
  a[1][0] = y;
  a[2][0] = x;
  a[0][1] = k;
  a[1][1] = 0;
  a[2][1] = x;
  a[0][2] = k;
  a[1][2] = k;
  a[2][2] = x;
  a[0][3] = 0;
  a[1][3] = 0;
  a[2][3] = k;
  cout << 3 << " " << 4 << "\n";
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j < 4; j++) {
      cout << a[i][j] << " ";
    }
    cout << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL), cout.tie(NULL);
  int t = 1;
  while (t--) solve();
  return 0;
}
