#include <iostream>

bool accept_nonnegative(int candidate, int& output) {
    if (candidate < 0) {
        return false;
    }
    output = candidate;
    return true;
}

int main() {
    int current{7};
    const bool first = accept_nonnegative(0, current);
    std::cout << first << ' ' << current << '\n';
    current = 7;
    const bool second = accept_nonnegative(-1, current);
    std::cout << second << ' ' << current << '\n';
}
