Untitled
#include <iostream> using namespace std; int main() { setlocale(LC_ALL, "Russian"); int a, l; cin >> a >> l; if (a % 2 == 0 and l % 2 != 0) { cout << a - l; } if (a % 2 != 0 and l % 2 == 0) { cout << l - a; } if (a % 2 != 0 and l % 2 != 0) { cout << "NO"; } else if (a > 0 and l > 0) { cout << "NO"; } }