#include <bits/stdc++.h>
using namespace std;
#define fastIO ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define pb(x) push_back(x)
#define N 100005
#define MOD 1000000007
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
typedef long long ll;
typedef unsigned long long ull;
int main() {
fastIO;
int n, arcs[N], sumup = 0;
cin >> n;
set<int> cum;
for(int i = 0; i < n; i++)
{
cin >> arcs[i];
sumup += arcs[i];
cum.insert(sumup);
}
cum.erase(sumup);
cum.insert(0);
if(sumup & 1)
{
cout << 'N' << endl;
return 0;
}
int half = sumup / 2, pairs = 0, sumup2 = 0;
for(int i = 0; i < n; i++)
{
sumup2 += arcs[i];
if(cum.find((sumup2 + half) % sumup) != cum.end())
pairs++;
}
if(pairs >= 4)
cout << 'Y' << endl;
else
cout << 'N' << endl;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKI2RlZmluZSBmYXN0SU8gaW9zX2Jhc2U6OnN5bmNfd2l0aF9zdGRpbyhmYWxzZSk7IGNpbi50aWUoMCk7IGNvdXQudGllKDApOwojZGVmaW5lIHBiKHgpIHB1c2hfYmFjayh4KSAKI2RlZmluZSBOIDEwMDAwNSAKI2RlZmluZSBNT0QgMTAwMDAwMDAwNwp0eXBlZGVmIHZlY3RvcjxpbnQ+IHZpOwp0eXBlZGVmIHZlY3Rvcjx2aT4gdnZpOwp0eXBlZGVmIHBhaXI8aW50LCBpbnQ+IHBpaTsKdHlwZWRlZiBsb25nIGxvbmcgbGw7CnR5cGVkZWYgdW5zaWduZWQgbG9uZyBsb25nIHVsbDsKCmludCBtYWluKCkgewoJZmFzdElPOwoJaW50IG4sIGFyY3NbTl0sIHN1bXVwID0gMDsKCWNpbiA+PiBuOwoJc2V0PGludD4gY3VtOwoJZm9yKGludCBpID0gMDsgaSA8IG47IGkrKykKCXsKCQljaW4gPj4gYXJjc1tpXTsKCQlzdW11cCArPSB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