#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
using Pii = pair<int, int>;
constexpr int MAX = 1000100;
int dp[MAX];
Pii ans[MAX];
void Init() {
  memset(dp, 0, sizeof(dp));
  memset(ans, -1, sizeof(ans));
  dp[0] = 1;
  for (int i = 1; i <= 10; ++i) {
    for (int j = i; j < MAX; ++j) {
      dp[j] += dp[j - i];
      if (dp[j] >= MAX) break;
      if (ans[dp[j]].first == -1) {
        ans[dp[j]] = {j, i};
      }
    }
  }
}
int main() {
  Init();
  int n;
  while (~scanf("%d", &n)) {
    printf("%d %d\n", ans[n].first, ans[n].second);
    for (int i = 1; i <= ans[n].second; ++i) {
      printf("%d%c", i, i < ans[n].second ? ' ' : '\n');
    }
  }
  return 0;
}
