#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;

#define mp make_pair
#define ff first
#define ss second
#define pb push_back
#define pf push_front
#define popb pop_back
#define popf pop_front
#define all(v) v.begin(),v.end()

const int maxn = 120;
const ll inf = 2e18, mod = 1e9 + 7;

int n, a[maxn];
ll dp[maxn][maxn][maxn];

void solve() {
	int l = n - 1, r = n - 1;
	dp[n - 1][1][0] = 1;
	for (int i = n - 1; i > 0; i--) {
		for (int options = 1; options < maxn; options++) {
			for (int pos = 0; pos < options; pos++) {
				if (dp[i][options][pos]) {
					int nextOptions = options, tmpPos = pos;
					ll val = dp[i][options][pos];

					if (a[l] != a[l - 1]) {
						nextOptions++;
						tmpPos++;
					}
					if (a[r] != a[r + 1]) {
						nextOptions++;
					}

					for (int nextPos = 0; nextPos < nextOptions; nextPos++) {
						if (tmpPos > nextPos) {
							dp[i - 1][nextOptions - abs(tmpPos - nextPos) + 1][nextPos] += val;
							dp[i - 1][nextOptions - abs(tmpPos - nextPos) + 1][nextPos] %= mod;
						}
						else if (tmpPos == nextPos) {
							dp[i - 1][nextOptions][nextPos] += val;
							dp[i - 1][nextOptions][nextPos] %= mod;
						}
						else {
							dp[i - 1][nextOptions - abs(tmpPos - nextPos) + 1][tmpPos + 1] += val;
							dp[i - 1][nextOptions - abs(tmpPos - nextPos) + 1][tmpPos + 1] %= mod;
						}
					}
				}
			}
		}
		l--;
		r++;
	}
}

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

	cin >> n;
	for (int i = 0; i < 2 * n - 1; i++) {
		cin >> a[i];
	}
	sort(a, a + 2 * n - 1);

	solve();

	ll ans = 0;
	for (int i = 0; i < maxn; i++) {
		for (int j = 0; j < maxn; j++) {
			ans = (ans + dp[0][i][j]) % mod;
		}
	}
	cout << ans << endl;
}

