#include <bits/stdc++.h>
using namespace std;
const int N = 500005;
void amfetamin() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cerr.tie(0);
}
int main() {
  amfetamin();
  int q;
  cin >> q;
  while (q--) {
    long long n, x, y;
    cin >> n >> x >> y;
    long long best, worst;
    if (x + y <= n)
      cout << 1 << " ";
    else {
      best = min(n, 1 + x + y - n);
      cout << best << " ";
    }
    if (x + y <= 2)
      cout << 1 << "\n";
    else {
      worst = min(n, 1 + x + y - 2);
      cout << worst << "\n";
    }
  }
}
