#include <bits/stdc++.h>
using namespace std;
int main()
long long a[200],i,n,t;
{
freopen("seq.inp","r",stdin);
freopen("seq.out","w",stdout);
cin>>n;
for (i=1; i<=n; i++) cin>>a[i];
t=0;
for (i=1; i<=n; i++) t=t+a[i];
for (i=1; i<=n; i++)
if ((t%a[i]==0) and (a[i]==t/2))
{
cout<<a[i]<<" ";
return 0;
}
cout<<"N";
return 0;
}