#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
long long n, t, x, y;
int main() {
  cin >> t;
  while (t--) {
    cin >> n >> x >> y;
    long long bad = min(n, x + y - 1);
    long long good = 0;
    if (x + y <= n)
      good = 1;
    else {
      good = min(x + y - n + 1, n);
    }
    cout << good << " " << bad << endl;
  }
  return 0;
}
