#include<bits/stdc++.h>
//#include <atcoder/all>

#define rep(i,n)for(int i=0;(i)<(int)(n);i++)
#define REP(i,a,b)for(int i=(int)(a);(i)<=(int)(b);i++)
#define ALL(a)  (a).begin(),(a).end()
#define pb push_back
#define fi first
#define se second
#define sz(x) ((int)x.size())
 
using namespace std;
//using namespace atcoder;
using ld = long double;
using ll =  long long;
using P = pair<ll, ll>;
 
template<typename T> bool chmin(T& a, const T& b) { if(a >= b){ a = b; return 1;} return 0; }
template<typename T> bool chmax(T& a, const T& b) { if(a <= b){ a = b; return 1;} return 0; }


const ll MOD = 1e9 + 7;
const ll INF = 1e9;


int main(){
    vector<int> a(3);
    rep(i, 3)cin >> a[i];
    sort(ALL(a));
    bool f = false;
    do{
        if(a[1] - a[0] == a[2] - a[1])f = true;
    }while(next_permutation(ALL(a)));
    cout << (f ? "Yes" : "No") << endl;
}
 
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; (i) < (int)(n); ++(i))
#define rep3(i, m, n) for (int i = (m); (i) < (int)(n); ++(i))
using namespace std;

int64_t solve(int N, const vector<int64_t> &A)
{
    vector<vector<int64_t>> DP(N, vector<int64_t>(N, INT64_MAX));
    rep(l, N){
        rep3(r, l, N){
            if (l == r){
                DP[l][r] = A[r];
            }else{
                DP[l][r] = min(DP[l][r-1], A[r]);
            }
        }
    }
    int64_t ans = INT64_MIN;
    rep(l, N){
        rep3(r, l, N){
            ans = max(ans, (r-l+1)*DP[l][r]);
        }
    }
    return ans;
    return 1;
    // TODO: edit here
}

// generated by online-judge-template-generator v4.7.1 (https://github.com/online-judge-tools/template-generator)
int main()
{
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    constexpr char endl = '\n';
    int N;
    cin >> N;
    vector<int64_t> A(N);
    rep(i, N) { cin >> A[i]; }
    auto ans = solve(N, A);
    cout << ans << endl;
    return 0;
}
