1. Abridged Problem Statement
Given 2·k labeled points equally spaced around a circle, we want to pair them up with k non‐directed chords so that no two chords cross. Such a non‐crossing perfect matching divides the disk into the smallest possible number of regions. Compute:
• N = the number of non‐crossing perfect matchings (i.e., the k-th Catalan number)
• P = the minimal number of regions produced, which is k+1

Input: one integer k (1≤k≤30).
Output: two integers N and P.

2. Detailed Editorial
Let’s denote by k the number of chords (so there are 2k points). Any perfect matching of the 2k points by chords partitions the disk into some number of regions. Crossing chords create extra regions, so to minimize the number of regions, we must avoid all crossings. It is well known that the number of non‐crossing perfect matchings on 2k points on a circle is the k-th Catalan number
  Cₖ = (1/(k+1))·binomial(2k, k)
and that such a matching produces exactly k+1 regions.

Proof sketch of minimality:
- Each chord adds at least one new region if it does not cross existing chords.
- Any crossing introduces additional intersection points, hence extra regions.
- Therefore the minimum is achieved exactly when no two chords intersect.

Catalan numbers satisfy the recurrence
  C₀ = 1,
  Cₙ = Σ_{i=0..n−1} Cᵢ · C_{n−1−i}  for n≥1.

Since k≤30, Cₖ fits in a 64-bit integer (C₃₀≈3.9·10¹⁴).

Algorithm:
1. Read k.
2. Compute C[0..k] by the standard DP recurrence.
3. Print C[k] and k+1.

Time complexity O(k²) = O(900) at most; memory O(k).

3. C++ Solution
```cpp
#include <bits/stdc++.h>

using namespace std;

template<typename T1, typename T2>
ostream& operator<<(ostream& out, const pair<T1, T2>& x) {
    return out << x.first << ' ' << x.second;
}

template<typename T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2>& x) {
    return in >> x.first >> x.second;
}

template<typename T>
istream& operator>>(istream& in, vector<T>& a) {
    for(auto& x: a) {
        in >> x;
    }
    return in;
};

template<typename T>
ostream& operator<<(ostream& out, const vector<T>& a) {
    for(auto x: a) {
        out << x << ' ';
    }
    return out;
};

int n;

void read() { cin >> n; }

void solve() {
    /*
     * Connecting 2k contiguous points with k non-crossing chords minimizes the
     * number of regions, and a set of k chords splits the disk into exactly
     * k + 1 parts when no two chords cross. The count of non-crossing perfect
     * matchings of 2k points on a circle is the k-th Catalan number, built here
     * with the recurrence C[i] = sum_{j<i} C[j] * C[i-1-j]. So N = Catalan(k)
     * and P = k + 1.
     */

    vector<int64_t> C(n + 1, 0);
    C[0] = 1;
    for(int i = 1; i <= n; i++) {
        for(int j = 0; j < i; j++) {
            C[i] += C[j] * C[i - j - 1];
        }
    }

    cout << C[n] << " " << n + 1 << '\n';
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int T = 1;
    // cin >> T;
    for(int test = 1; test <= T; test++) {
        read();
        // cout << "Case #" << test << ": ";
        solve();
    }

    return 0;
}
```

4. Python Solution with Detailed Comments
```python
def main():
    import sys
    data = sys.stdin.read().split()
    k = int(data[0])  # number of chord pairs

    # Initialize a list for Catalan numbers up to k
    C = [0] * (k + 1)
    C[0] = 1  # base case

    # Build up using C[n] = sum_{i=0..n-1} C[i]*C[n-1-i]
    for n in range(1, k + 1):
        total = 0
        for i in range(n):
            total += C[i] * C[n - 1 - i]
        C[n] = total

    # Minimal regions = k+1
    print(C[k], k + 1)

if __name__ == "__main__":
    main()
```

5. Compressed Editorial
• Minimal regions achieved by zero crossings ⇒ regions = k+1.
• Number of ways = k-th Catalan number, computed by C₀=1 and Cₙ = Σ_{i=0..n−1} Cᵢ·C_{n−1−i}.
