#include <iostream>
using namespace std;
int main()
{
int N, m01 = 1001, m02 = 1001, m10 = 1001, m11 = 1001, num, res, R;
cin >> N;
for (; N >=1; --N)
{
cin >> num;
if (num < m01 || num < m02 && num%2==0)
{
if (num < m01)
m01 = num;
else
if (num < m02)
m02 = num;
}
else
if (num < m11 || num < m10)
{
if (num < m10)
m10 = num;
else
if (num < m11)
m11 = num;
}
}
cin >> res;
if (m01+m02>m11+m10)
R = m11+m10;
else
R = m01+m02;
cout << "Result: " << R << endl;
if (R == res)
cout << "YES";
else
cout << "NO";
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgogCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CiAKaW50IG1haW4oKQp7CiAgICBpbnQgTiwgbTAxID0gMTAwMSwgbTAyID0gMTAwMSwgbTEwID0gMTAwMSwgbTExID0gMTAwMSwgbnVtLCByZXMsIFI7CiAgICBjaW4gPj4gTjsKICAgIGZvciAoOyBOID49MTsgLS1OKQogICAgewogICAgICAgIGNpbiA+PiBudW07CiAgICAgICAgaWYgKG51bSA8IG0wMSB8fCBudW0gPCBtMDIgJiYgbnVtJTI9PTApCiAgICAgICAgewogICAgICAgICAgICBpZiAobnVtIDwgbTAxKQogICAgICAgICAgICAgICAgbTAxID0gbnVtOwogICAgICAgICAgICBlbHNlCiAgICAgICAgICAgICAgICBpZiAobnVtIDwgbTAyKQogICAgICAgICAgICAgICAgICAgIG0wMiA9IG51bTsKICAgICAgICB9CiAgICAgICAgZWxzZQogICAgICAgICAgICBpZiAobnVtIDwgbTExIHx8IG51bSA8IG0xMCkKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgaWYgKG51bSA8IG0xMCkKICAgICAgICAgICAgICAgICAgICBtMTAgPSBudW07CiAgICAgICAgICAgICAgICBlbHNlCiAgICAgICAgICAgICAgICAgICAgaWYgKG51bSA8IG0xMSkKICAgICAgICAgICAgICAgICAgICAgICAgbTExID0gbnVtOwogICAgICAgICAgICB9CiAgICB9CiAgICBjaW4gPj4gcmVzOwogICAgaWYgKG0wMSttMDI+bTExK20xMCkKICAgICAgICBSID0gbTExK20xMDsKICAgIGVsc2UKICAgICAgICBSID0gbTAxK20wMjsKIAogICAgY291dCA8PCAiUmVzdWx0OiAiIDw8IFIgPDwgZW5kbDsKICAgIGlmIChSID09IHJlcykKICAgICAgICBjb3V0IDw8ICJZRVMiOwogICAgZWxzZQogICAgICAgIGNvdXQgPDwgIk5PIjsKIAogICAgcmV0dXJuIDA7Cn0=