Untitled

mail@pastecode.io avatar
unknown
c_cpp
a year ago
308 B
0
Indexable
Never
#include <iostream>
using namespace std;

int main() {

	int a, b,max,min;

	cin >> a;
	cin >> b;

	if (a > b) {
		max = a;
		min = b;
	}
	else {
		max = b;
		min = a;
	}

	if (max % 2 == 0 && max > 0 && min % 2 != 0 && min < 0) {
		cout << max - min;
	}
	else {
		cout << "NO";
	}
}