Language: C++

#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
#include <vector>
#include <array>
#include <map>
#include <set>
#include <stack>
#include <cstdint>
#include <cmath>
#include <algorithm>
#include <utility>
#include <numeric>
#include <functional>
#include <cassert>

using namespace std;
using ll = int64_t;
using ull = uint64_t;

constexpr ll INF = 1000000000;/* 1e+9a */

void solve(istream &cin) {
    ll N;
    if (!(cin >> N)) { return; }
    ll A, B;
    cin >> A >> B;
    ll maxim = min(A, B);
    ll minimum = max(ll{0}, A + B - N);
    cout << maxim << ' ' << minimum << endl;

}

int main(int argc, char *argv[]) {
    string FileName("A"), Modifier("MEPH_");
    string ExecutionName = Modifier + FileName;
    string sub(argv[0]);
    // /home/USER/.../MEPH_X -> MEPH_X
    if (sub.size() > ExecutionName.size())
        sub = sub.substr(sub.size() - ExecutionName.size(), ExecutionName.size());

    cout << setprecision(16) << scientific;
    if (sub != ExecutionName) {
        cin.tie(0);
        ios::sync_with_stdio(false);
        while (cin) { solve(cin); }
    } else {
        cerr << sub << " test" << endl;
        string inFile = FileName + ".txt";
        auto fs = fstream(inFile, fstream::in);
        while (fs) { solve(fs); }
    }
}
#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
#include <vector>
#include <array>
#include <map>
#include <set>
#include <stack>
#include <cstdint>
#include <cmath>
#include <algorithm>
#include <utility>
#include <numeric>
#include <functional>
#include <cassert>

using namespace std;
using ll = int64_t;
using ull = uint64_t;

constexpr ll INF = 1000000000;/* 1e+9a */

void solve(istream &cin) {
    ll N;
    if (!(cin >> N)) { return; }
    ll A, B;
    cin >> A >> B;
    ll maxim = min(A, B);
    ll minimum = max(ll{0}, A + B - N);
    cout << maxim << ' ' << minimum << endl;

}

int main(int argc, char *argv[]) {
    string FileName("A"), Modifier("MEPH_");
    string ExecutionName = Modifier + FileName;
    string sub(argv[0]);
    // /home/USER/.../MEPH_X -> MEPH_X
    if (sub.size() > ExecutionName.size())
        sub = sub.substr(sub.size() - ExecutionName.size(), ExecutionName.size());

    cout << setprecision(16) << scientific;
    if (sub != ExecutionName) {
        cin.tie(0);
        ios::sync_with_stdio(false);
        while (cin) { solve(cin); }
    } else {
        cerr << sub << " test" << endl;
        string inFile = FileName + ".txt";
        auto fs = fstream(inFile, fstream::in);
        while (fs) { solve(fs); }
    }
}


Compiler output:
a.cc:76:14: error: redefinition of 'constexpr const ll INF'
   76 | constexpr ll INF = 1000000000;/* 1e+9a */
      |              ^~~
a.cc:22:14: note: 'constexpr const ll INF' previously defined here
   22 | constexpr ll INF = 1000000000;/* 1e+9a */
      |              ^~~
a.cc:78:6: error: redefinition of 'void solve(std::istream&)'
   78 | void solve(istream &cin) {
      |      ^~~~~
a.cc:24:6: note: 'void solve(std::istream&)' previously defined here
   24 | void solve(istream &cin) {
      |      ^~~~~
a.cc:89:5: error: redefinition of 'int main(int, char**)'
   89 | int main(int argc, char *argv[]) {
      |     ^~~~
a.cc:35:5: note: 'int main(int, char**)' previously defined here
   35 | int main(int argc, char *argv[]) {
      |     ^~~~