//d 不一定是最大的 如果全为负数则 d为最小的
#include <iostream>
#include <istream>
#include <sstream>
#include <vector>
#include <stack>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <cstring>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <numeric>
#include <chrono>
#include <ctime>
#include <cmath>
#include <cctype>
#include <string>
#include <cstdio>
#include <iomanip>
#include <thread>
#include <mutex>
#include <condition_variable>
#include <functional>
#include <iterator>
using namespace std;
const int INF = 0x3f3f3f3f, maxn = 1007;
long long int n, arr[maxn];
unordered_map<long long int, vector<pair<int, int>>> mmp;
long long int GetResult() {
long long int ans = -INF;
for (int d = 0; d < n; d++) {
for (int c = 0; c < n; c++) {
if(c == d) continue;
long long int remain = arr[d] - arr[c];
if (!mmp.count(remain))continue;
vector<pair<int, int>>& tarr = mmp[remain];
for (int i = 0; i < tarr.size(); i++) {
int a = tarr[i].first;
int b = tarr[i].second;
if (a != c && a != d && b!=c && b != d) {
ans = max(ans,arr[d]);
}
}
}
}
return ans;
}
int main()
{
while (cin >> n && n) {
for (int i = 0; i < n; i++)
cin >> arr[i];
mmp.clear();
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
long long int sum = arr[i] + arr[j];
mmp[sum].push_back(make_pair(i, j));
}
}
long long int ans = GetResult();
if (ans == -INF) cout << "no solution" << endl;
else cout << ans << endl;
}
return 0;
}