
#include <iostream>

using namespace std;

void swap(int& a, int& b, int& c) {
	if (a > b) std::swap(a,b);
	if (b > c) std::swap(b,c);
}

int main()
{
	int N, m01 = 1002, m02 = 1003, m11 = 1002, m12 = 1003, num, res, R;
	cin >> N;
	for (; N >=1; --N)
	{
		cin >> num;
		if (num%2==0)	swap(m01, m02, num);
		else			swap(m11, m12, num);
	}
			
	cin >> res;
	if (m01+m02>m11+m12)
		R = m11+m12;
	else
		R = m01+m02;

	cout << "Result: " << R << endl;
	if (R == res)
		cout << "YES";
	else
		cout << "NO";
	system("pause>void");
	return 0;
}